diff options
author | redmatrix <git@macgirvin.com> | 2016-07-13 23:05:19 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-07-13 23:05:19 -0700 |
commit | 191cd21028ab108c2a7f982c654601d780865eff (patch) | |
tree | 9610f003b964949a135f464d3caff16f28fea1fe /include/items.php | |
parent | b3a785711cde52a3c03c0a0eb90ce4e9ce8d9059 (diff) | |
download | volse-hubzilla-191cd21028ab108c2a7f982c654601d780865eff.tar.gz volse-hubzilla-191cd21028ab108c2a7f982c654601d780865eff.tar.bz2 volse-hubzilla-191cd21028ab108c2a7f982c654601d780865eff.zip |
more perms work
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php index ad12e4f98..702d49d40 100755 --- a/include/items.php +++ b/include/items.php @@ -183,7 +183,7 @@ function is_item_normal($item) { * This function examines the comment_policy attached to an item and decides if the current observer has * sufficient privileges to comment. This will normally be called on a remote site where perm_is_allowed() * will not be suitable because the post owner does not have a local channel_id. - * Generally we should look at the item - in particular the author['book_flags'] and see if ABOOK_FLAG_SELF is set. + * Generally we should look at the item - in particular the author['abook_flags'] and see if ABOOK_FLAG_SELF is set. * If it is, you should be able to use perm_is_allowed( ... 'post_comments'), and if it isn't you need to call * can_comment_on_post() * We also check the comments_closed date/time on the item if this is set. @@ -224,8 +224,7 @@ function can_comment_on_post($observer_xchan, $item) { case 'contacts': case 'authenticated': case '': - if(array_key_exists('owner',$item)) { - if(($item['owner']['abook_xchan']) && ($item['owner']['abook_their_perms'] & PERMS_W_COMMENT)) + if(array_key_exists('owner',$item) && get_abconfig($item['uid'],$item['owner']['abook_xchan'],'their_perms','post_comments')) { return true; } break; @@ -2856,7 +2855,7 @@ function check_item_source($uid, $item) { if(! $x) return false; - if(! ($x[0]['abook_their_perms'] & PERMS_A_REPUBLISH)) + if(! get_abconfig($uid,$item['owner_xchan'],'their_perms','republish')) return false; if($item['item_private'] && (! intval($x[0]['abook_feed']))) |