aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-09-05 12:17:50 +0200
committerMario Vavti <mario@mariovavti.com>2018-09-05 12:17:50 +0200
commit5d1539df75ae1e719da77e64c738ae3ea2c84f55 (patch)
tree4c0a690fb1efa2cdf7fa8bc7c46ba530fde6666d /Zotlabs
parenta821682c8c165077947781bca2064922884f6e7d (diff)
parent41ccb61c2e2f2123ae510a39ebd048a56832825e (diff)
downloadvolse-hubzilla-5d1539df75ae1e719da77e64c738ae3ea2c84f55.tar.gz
volse-hubzilla-5d1539df75ae1e719da77e64c738ae3ea2c84f55.tar.bz2
volse-hubzilla-5d1539df75ae1e719da77e64c738ae3ea2c84f55.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Item.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index a24d6da9c..640b4fa5c 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -29,7 +29,7 @@ use \Zotlabs\Lib as Zlib;
class Item extends \Zotlabs\Web\Controller {
function post() {
-
+
// This will change. Figure out who the observer is and whether or not
// they have permission to post here. Else ignore the post.
@@ -237,12 +237,10 @@ class Item extends \Zotlabs\Web\Controller {
if($parent) {
logger('mod_item: item_post parent=' . $parent);
$can_comment = false;
-
- $can_comment = can_comment_on_post($observer['xchan_hash'],$parent_item);
- if (!$can_comment) {
- if((array_key_exists('owner',$parent_item)) && intval($parent_item['owner']['abook_self'])==1 )
- $can_comment = perm_is_allowed($profile_uid,$observer['xchan_hash'],'post_comments');
- }
+ if((array_key_exists('owner',$parent_item)) && intval($parent_item['owner']['abook_self']))
+ $can_comment = perm_is_allowed($profile_uid,$observer['xchan_hash'],'post_comments');
+ else
+ $can_comment = can_comment_on_post($observer['xchan_hash'],$parent_item);
if(! $can_comment) {
notice( t('Permission denied.') . EOL) ;