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.
This commit is contained in:
parent
9e28318e4d
commit
4e69119d58
@ -144,10 +144,16 @@ class Conversation extends BaseObject {
|
|||||||
if($this->writable)
|
if($this->writable)
|
||||||
$this->commentable = true;
|
$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);
|
$this->commentable = can_comment_on_post($this->observer['xchan_hash'],$item->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$item->set_conversation($this);
|
$item->set_conversation($this);
|
||||||
$this->threads[] = $item;
|
$this->threads[] = $item;
|
||||||
return end($this->threads);
|
return end($this->threads);
|
||||||
|
Reference in New Issue
Block a user