aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-09-09 21:17:06 -0700
committerfriendica <info@friendica.com>2012-09-09 21:17:06 -0700
commit3ebb4a3dc7a369e7a716ab93d02b44b20522080f (patch)
tree5b8daecf7a29c6fe2f0c8572204d9e2bd1713a50 /include/conversation.php
parenta08666be142c484134c2f10cf0c460c8a3c07682 (diff)
downloadvolse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.tar.gz
volse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.tar.bz2
volse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.zip
updates
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 7f0edc5de..7fb341ef3 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -365,12 +365,31 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr
$thumb = $item['thumb'];
$indent = '';
$osparkle = '';
+ $visiting = false;
$lastcollapsed = false;
$firstcollapsed = false;
$total_children += count_descendants($item);
$toplevelpost = (($item['id'] == $item['parent']) ? true : false);
+
+
+ if($item['uid'] == local_user())
+ $dropping = true;
+ elseif(is_array($_SESSION['remote'])) {
+ foreach($_SESSION['remote'] as $visitor) {
+ if($visitor['cid'] == $item['contact-id']) {
+ $dropping = true;
+ $visiting = true;
+ break;
+ }
+ }
+ }
+
$item_writeable = (($item['writable'] || $item['self']) ? true : false);
+
+ if($visiting && $mode == 'profile')
+ $item_writeable = true;
+
$show_comment_box = ((($page_writeable) && ($item_writeable)) ? true : false);
$lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))))
@@ -382,8 +401,6 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr
$edpost = array($a->get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit"));
else
$edpost = false;
- if((intval($item['contact-id']) && $item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
- $dropping = true;
$drop = array(
'dropping' => $dropping,