aboutsummaryrefslogtreecommitdiffstats
path: root/include/ItemObject.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-20 05:45:11 -0700
committerfriendica <info@friendica.com>2013-09-20 05:45:11 -0700
commite6d93b251606e7261db3a5048cf730c2e69a28e3 (patch)
tree4947c54a17a65b1804987f402fc4a9f0acae5ca7 /include/ItemObject.php
parenta44e15dc2c0fbd47051408c8f00988eea1cd4296 (diff)
downloadvolse-hubzilla-e6d93b251606e7261db3a5048cf730c2e69a28e3.tar.gz
volse-hubzilla-e6d93b251606e7261db3a5048cf730c2e69a28e3.tar.bz2
volse-hubzilla-e6d93b251606e7261db3a5048cf730c2e69a28e3.zip
is_commentable() had some major issues when applied to the atrocity known as ConversationObject, hopefully this won't destabilise the network as it's a somewhat major permission tweak related to comments; also add any local clones to allowed_public_recips() as they should always be allowed recipients. Not sure what to do about host permissions in the event of clones. They have more than one host, and it isn't spelled out in the sent message.
All of this stuff will make your head hurt.
Diffstat (limited to 'include/ItemObject.php')
-rw-r--r--include/ItemObject.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php
index 0256160e9..681757a09 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -14,6 +14,7 @@ class Item extends BaseObject {
public $data = array();
private $template = 'conv_item.tpl';
private $comment_box_template = 'comment_item.tpl';
+ private $commentable = false;
private $toplevel = false;
private $children = array();
private $parent = null;
@@ -295,6 +296,15 @@ class Item extends BaseObject {
return $this->threaded;
}
+
+ public function set_commentable($val) {
+ $this->commentable = $val;
+ }
+
+ public function is_commentable() {
+ return $this->commentable;
+ }
+
/**
* Add a child item
*/
@@ -480,7 +490,9 @@ class Item extends BaseObject {
$comment_box = '';
$conv = $this->get_conversation();
- if(! $conv->is_commentable())
+// logger('Commentable conv: ' . $conv->is_commentable());
+
+ if(! $this->is_commentable())
return;
$template = get_markup_template($this->get_comment_box_template());