diff options
author | tony baldwin <tony@tonybaldwin.org> | 2014-04-12 08:37:56 -0400 |
---|---|---|
committer | tony baldwin <tony@tonybaldwin.org> | 2014-04-12 08:37:56 -0400 |
commit | ebd33b185da1c36e718dfa4a2971c3db35cbda22 (patch) | |
tree | c23cbf55aac433c90ac254d0684dabf9d4528133 /mod/like.php | |
parent | 5cca00ddc79dad667464674e08a2a860e262eabd (diff) | |
parent | d0834c7e1394e1986b2b00e039125deff74d9e5e (diff) | |
download | volse-hubzilla-ebd33b185da1c36e718dfa4a2971c3db35cbda22.tar.gz volse-hubzilla-ebd33b185da1c36e718dfa4a2971c3db35cbda22.tar.bz2 volse-hubzilla-ebd33b185da1c36e718dfa4a2971c3db35cbda22.zip |
Merge remote-tracking branch 'upstream/master'
Conflicts:
view/theme/redbasic/css/style.css
whatever
Diffstat (limited to 'mod/like.php')
-rwxr-xr-x | mod/like.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mod/like.php b/mod/like.php index 007d1aee1..a76867422 100755 --- a/mod/like.php +++ b/mod/like.php @@ -48,12 +48,20 @@ function like_content(&$a) { $item = $r[0]; + $sys = get_sys_channel(); + $owner_uid = $item['uid']; $owner_aid = $item['aid']; - if(! perm_is_allowed($owner_uid,$observer['xchan_hash'],'post_comments')) { - notice( t('Permission denied') . EOL); - killme(); + // if this is a "discover" item, (item['uid'] is the sys channel), + // fallback to the item comment policy, which should've been + // respected when generating the conversation thread. + // Even if the activity is rejected by the item owner, it should still get attached + // to the local discover conversation on this site. + + if(($owner_uid != $sys['channel_id']) && (! perm_is_allowed($owner_uid,$observer['xchan_hash'],'post_comments'))) { + notice( t('Permission denied') . EOL); + killme(); } $r = q("select * from xchan where xchan_hash = '%s' limit 1", |