aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-07-14 21:09:19 -0700
committerfriendica <info@friendica.com>2013-07-14 21:09:19 -0700
commit4e69119d5816cefa3eee23fae5dfd66cf358c274 (patch)
tree376a9f8d050b884ce1564e11081c9674069dc31c
parent9e28318e4d9802ee6d901c9144427f11d08d4898 (diff)
downloadvolse-hubzilla-4e69119d5816cefa3eee23fae5dfd66cf358c274.tar.gz
volse-hubzilla-4e69119d5816cefa3eee23fae5dfd66cf358c274.tar.bz2
volse-hubzilla-4e69119d5816cefa3eee23fae5dfd66cf358c274.zip
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.
-rw-r--r--include/ConversationObject.php8
1 files changed, 7 insertions, 1 deletions
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);