diff options
author | Friendika <info@friendika.com> | 2011-08-11 01:52:31 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-08-11 01:52:31 -0700 |
commit | 04b59ac49ae20cadc20c06663451359b98de73f5 (patch) | |
tree | c36856f2f9b86e8270c1813deaa3c660d6dcd431 /include/conversation.php | |
parent | 3f61f9f2c56a13170c03610665727b5ec17c841b (diff) | |
download | volse-hubzilla-04b59ac49ae20cadc20c06663451359b98de73f5.tar.gz volse-hubzilla-04b59ac49ae20cadc20c06663451359b98de73f5.tar.bz2 volse-hubzilla-04b59ac49ae20cadc20c06663451359b98de73f5.zip |
enhanced email privacy
Diffstat (limited to 'include/conversation.php')
-rw-r--r-- | include/conversation.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/conversation.php b/include/conversation.php index 6b1f64925..0d901a3c0 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -283,14 +283,14 @@ function conversation(&$a, $items, $mode, $update) { continue; $toplevelpost = (($item['id'] == $item['parent']) ? true : false); - + $toplevelprivate = false; // Take care of author collapsing and comment collapsing // If a single author has more than 3 consecutive top-level posts, squash the remaining ones. // If there are more than two comments, squash all but the last 2. - + if($toplevelpost) { - + $toplevelprivate = (($toplevelpost && $item['private']) ? true : false); $item_writeable = (($item['writable'] || $item['self']) ? true : false); if($blowhard == $item['cid'] && (! $item['self']) && ($mode != 'profile') && ($mode != 'notes')) { @@ -312,9 +312,12 @@ function conversation(&$a, $items, $mode, $update) { $comments_seen = 0; $comments_collapsed = false; } - else + else { + // prevent private email from leaking into public conversation + if((! $toplevelpost) && (! toplevelprivate) && ($item['private']) && ($profile_owner != local_user())) + continue; $comments_seen ++; - + } $override_comment_box = ((($page_writeable) && ($item_writeable)) ? true : false); $show_comment_box = ((($page_writeable) && ($item_writeable) && ($comments_seen == $comments[$item['parent']])) ? true : false); |