From 28cd8594a7dcaf7d21b8b92c44ace34dc8aa6dd4 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 16 Jun 2013 20:44:29 -0700 Subject: implement 'can_comment_on_post()' which doesn't require a separate DB lookup per item. --- include/ItemObject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/ItemObject.php') diff --git a/include/ItemObject.php b/include/ItemObject.php index ccd192ff5..351f446d4 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -44,7 +44,7 @@ class Item extends BaseObject { $this->commentable = $this->writable; if(($this->observer) && (! $this->writable)) { - $this->commentable = perm_is_allowed($this->data['uid'],$this->observer['xchan_hash'],'post_comments'); + $this->commentable = can_comment_on_post($this->observer['xchan_hash'],$data); } // logger('writable: ' . $this->writable); -- cgit v1.2.3