aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-30 21:49:26 -0700
committerfriendica <info@friendica.com>2013-09-30 21:49:26 -0700
commitdffce63662c54db7ebb61786d39db6a900d1381f (patch)
tree88004c4a8362f4ee77bf670207076f76d876eb84 /include/items.php
parent2353e6d23f54902d3b2b9e3fd46f1baa6e803450 (diff)
downloadvolse-hubzilla-dffce63662c54db7ebb61786d39db6a900d1381f.tar.gz
volse-hubzilla-dffce63662c54db7ebb61786d39db6a900d1381f.tar.bz2
volse-hubzilla-dffce63662c54db7ebb61786d39db6a900d1381f.zip
implement republish permission for use in sourced channels
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php11
1 files changed, 11 insertions, 0 deletions
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;