diff options
author | zotlabs <mike@macgirvin.com> | 2017-06-20 05:11:07 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-06-20 05:11:07 -0700 |
commit | 1b31c9f8a875db70154b8512b1e2f96f0a6731cd (patch) | |
tree | eb1bd77facd2eae69a62fba592dd1f88b39c291a /Zotlabs/Lib/ThreadItem.php | |
parent | b0a6a5a91e0180c0ed3de1af324e7b9567c5e108 (diff) | |
download | volse-hubzilla-1b31c9f8a875db70154b8512b1e2f96f0a6731cd.tar.gz volse-hubzilla-1b31c9f8a875db70154b8512b1e2f96f0a6731cd.tar.bz2 volse-hubzilla-1b31c9f8a875db70154b8512b1e2f96f0a6731cd.zip |
prevent likes/dislikes/etc. from anon commenters
Diffstat (limited to 'Zotlabs/Lib/ThreadItem.php')
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 50c67c466..8ee35f988 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -153,7 +153,7 @@ class ThreadItem { $response_verbs[] = 'attendyes'; $response_verbs[] = 'attendno'; $response_verbs[] = 'attendmaybe'; - if($this->is_commentable()) { + if($this->is_commentable() && $observer) { $isevent = true; $attend = array( t('I will attend'), t('I will not attend'), t('I might attend')); } @@ -164,7 +164,7 @@ class ThreadItem { $response_verbs[] = 'agree'; $response_verbs[] = 'disagree'; $response_verbs[] = 'abstain'; - if($this->is_commentable()) { + if($this->is_commentable() && $observer) { $conlabels = array( t('I agree'), t('I disagree'), t('I abstain')); $canvote = true; } @@ -263,7 +263,7 @@ class ThreadItem { if(($item['obj_type'] === ACTIVITY_OBJ_EVENT) && $conv->get_profile_owner() == local_channel()) $has_event = true; - if($this->is_commentable()) { + 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")); } @@ -369,7 +369,7 @@ class ThreadItem { 'has_tags' => $has_tags, 'reactions' => $this->reactions, // Item toolbar buttons - 'emojis' => (($this->is_toplevel() && $this->is_commentable() && 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 : ''), 'share' => $share, |