From 4e69119d5816cefa3eee23fae5dfd66cf358c274 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 14 Jul 2013 21:09:19 -0700 Subject: implement the other part of ITEM_NOCOMMENT - which means an item is not commentable. Useful for pages - that is if they use the conversation() function to render the post. --- include/ConversationObject.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/ConversationObject.php b/include/ConversationObject.php index 3f5e901d3..30026e908 100644 --- a/include/ConversationObject.php +++ b/include/ConversationObject.php @@ -144,10 +144,16 @@ class Conversation extends BaseObject { if($this->writable) $this->commentable = true; - if(($this->observer) && (! $this->writable)) { + if($item->get_data_value('item_flags') & ITEM_NOCOMMENT) { + $this->commentable = false; + } + elseif(($this->observer) && (! $this->writable)) { $this->commentable = can_comment_on_post($this->observer['xchan_hash'],$item->data); } + + + $item->set_conversation($this); $this->threads[] = $item; return end($this->threads); -- cgit v1.2.3