aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-04-29 23:24:48 +0200
committerMax Kostikov <max@kostikov.co>2019-04-29 23:24:48 +0200
commit6db323b15e6e9b5429d8d786959fcd60af4a30b2 (patch)
treeeae618b91e94e94f81aa0447237daed52999249a /Zotlabs/Lib
parent5abbfd3f19b6b77ea8d6dd418afcb84775716f21 (diff)
downloadvolse-hubzilla-6db323b15e6e9b5429d8d786959fcd60af4a30b2.tar.gz
volse-hubzilla-6db323b15e6e9b5429d8d786959fcd60af4a30b2.tar.bz2
volse-hubzilla-6db323b15e6e9b5429d8d786959fcd60af4a30b2.zip
Add variables for threaded comments support
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/ThreadItem.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index 40c0fca4b..22f4724a0 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -305,6 +305,7 @@ class ThreadItem {
if($this->is_commentable() && $observer) {
$like = array( t("I like this \x28toggle\x29"), t("like"));
$dislike = array( t("I don't like this \x28toggle\x29"), t("dislike"));
+ $reply_to = array( t("Reply on this comment"), t("reply"));
}
if ($shareable) {
@@ -348,9 +349,6 @@ class ThreadItem {
$list_unseen_txt = (($unseen_comments) ? sprintf('%d unseen',$unseen_comments) : '');
-
-
-
$children = $this->get_children();
$has_tags = (($body['tags'] || $body['categories'] || $body['mentions'] || $body['attachments'] || $body['folders']) ? true : false);
@@ -373,6 +371,8 @@ class ThreadItem {
'text' => strip_tags($body['html']),
'id' => $this->get_id(),
'mid' => $item['mid'],
+ 'parent' => $item['parent'],
+ 'author_id' => $item['author']['xchan_addr'],
'isevent' => $isevent,
'attend' => $attend,
'consensus' => $consensus,
@@ -425,9 +425,10 @@ class ThreadItem {
'has_tags' => $has_tags,
'reactions' => $this->reactions,
// Item toolbar buttons
- 'emojis' => (($this->is_toplevel() && $this->is_commentable() && $observer && feature_enabled($conv->get_profile_owner(),'emojis')) ? '1' : ''),
+ 'emojis' => (($this->is_toplevel() && $this->is_commentable() && $observer && feature_enabled($conv->get_profile_owner(),'emojis')) ? '1' : ''),
'like' => $like,
'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike : ''),
+ 'reply_to' => (((! $this->is_toplevel()) && feature_enabled($conv->get_profile_owner(),'reply_to')) ? $reply_to : ''),
'share' => $share,
'embed' => $embed,
'rawmid' => $item['mid'],
@@ -869,4 +870,3 @@ class ThreadItem {
}
-