aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-10-25 18:42:42 -0700
committerfriendica <info@friendica.com>2012-10-25 18:42:42 -0700
commit3b394ea43fd3bc011f98a9160a8b408283f97ebc (patch)
treeda7fe5fc9089752af8467937355991b45c345776 /include
parentebb75340ec1b152eab0319f5811711ad192a2802 (diff)
downloadvolse-hubzilla-3b394ea43fd3bc011f98a9160a8b408283f97ebc.tar.gz
volse-hubzilla-3b394ea43fd3bc011f98a9160a8b408283f97ebc.tar.bz2
volse-hubzilla-3b394ea43fd3bc011f98a9160a8b408283f97ebc.zip
comments sort of working again but now need to fix the threading which was ported when it was only half working
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 98e8c3694..ce6f017e1 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -398,7 +398,11 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr
}
}
- $item_writeable = (($item['writable'] || $item['self']) ? true : false);
+ $channel = $a->get_channel();
+
+// FIXME
+// $item_writeable = (($item['writable'] || $item['self']) ? true : false);
+ $item_writeable = ((local_user() && $channel['channel_hash'] === $item['owner_xchan']) ? true : false);
if($visiting && $mode == 'profile')
$item_writeable = true;
@@ -744,7 +748,9 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
$page_dropping = ((local_user() && local_user() == $profile_owner) ? true : false);
-
+
+ $channel = $a->get_channel();
+ $observer = $a->get_observer();
if($update)
$return_url = $_SESSION['return_url'];
@@ -988,8 +994,8 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
// If there are more than two comments, squash all but the last 2.
if($toplevelpost) {
-
- $item_writeable = (($item['writable'] || $item['self']) ? true : false);
+// FIXME - base this on observer permissions
+ $item_writeable = ((local_user() && $channel['channel_hash'] === $item['owner_xchan']) ? true : false);
$comments_seen = 0;
$comments_collapsed = false;
@@ -1116,9 +1122,9 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
'$parent' => $item['parent'],
'$qcomment' => $qcomment,
'$profile_uid' => $profile_owner,
- '$mylink' => $a->contact['url'],
+ '$mylink' => $observer['xchan_profile'],
'$mytitle' => t('This is you'),
- '$myphoto' => $a->contact['thumb'],
+ '$myphoto' => $observer['xchan_photo_s'],
'$comment' => t('Comment'),
'$submit' => t('Submit'),
'$edbold' => t('Bold'),