possible fix for issue #398
This commit is contained in:
parent
28228f5862
commit
d820fa155b
14
mod/like.php
14
mod/like.php
@ -48,12 +48,20 @@ function like_content(&$a) {
|
|||||||
|
|
||||||
$item = $r[0];
|
$item = $r[0];
|
||||||
|
|
||||||
|
$sys = get_sys_channel();
|
||||||
|
|
||||||
$owner_uid = $item['uid'];
|
$owner_uid = $item['uid'];
|
||||||
$owner_aid = $item['aid'];
|
$owner_aid = $item['aid'];
|
||||||
|
|
||||||
if(! perm_is_allowed($owner_uid,$observer['xchan_hash'],'post_comments')) {
|
// if this is a "discover" item, (item['uid'] is the sys channel),
|
||||||
notice( t('Permission denied') . EOL);
|
// fallback to the item comment policy, which should've been
|
||||||
killme();
|
// 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",
|
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
|
||||||
|
Reference in New Issue
Block a user