From dffce63662c54db7ebb61786d39db6a900d1381f Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 30 Sep 2013 21:49:26 -0700 Subject: implement republish permission for use in sourced channels --- include/items.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index dcd9eb6fc..18736f974 100755 --- a/include/items.php +++ b/include/items.php @@ -2308,6 +2308,17 @@ function check_item_source($uid,$item) { if(! $r) return false; + $x = q("select abook_their_perms from abook where abook_channel = %d and abook_xchan = '%s' limit 1", + intval($uid), + dbesc($item['owner_xchan']) + ); + + if(! $x) + return false; + + if(! ($x[0]['abook_their_perms'] & PERMS_A_REPUBLISH)) + return false; + if($r[0]['src_channel_xchan'] === $item['owner_xchan']) return false; -- cgit v1.2.3