aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-07-18 16:45:43 -0700
committerredmatrix <git@macgirvin.com>2016-07-18 16:45:43 -0700
commitb5b57523f14597f13b88a93f8787bb5a4f966c58 (patch)
tree0463cf24db71539ba4bf355f60b7e9f461677109 /include/zot.php
parent7524948a970271072030b3f67183152b2c23081b (diff)
downloadvolse-hubzilla-b5b57523f14597f13b88a93f8787bb5a4f966c58.tar.gz
volse-hubzilla-b5b57523f14597f13b88a93f8787bb5a4f966c58.tar.bz2
volse-hubzilla-b5b57523f14597f13b88a93f8787bb5a4f966c58.zip
more perms work
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 2ebcc4bf0..0a835a909 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2938,6 +2938,12 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
$channel = $r[0];
translate_channel_perms_outbound($channel);
+ if($packet && array_key_exists('abook',$packet) && $packet['abook']) {
+ for($x = 0; $x < count($packet['abook']); $x ++) {
+ translate_abook_perms_outbound($packet['abook'][$x]);
+ }
+ }
+
if(intval($channel['channel_removed']))
return;
@@ -3195,6 +3201,8 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
foreach($arr['abook'] as $abook) {
+
+
$abconfig = null;
if(array_key_exists('abconfig',$abook) && is_array($abook['abconfig']) && count($abook['abconfig']))
@@ -3289,6 +3297,12 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
}
}
+ // This will set abconfig vars if the sender is using old-style fixed permissions
+ // using the raw abook record as passed to us. New-style permissions will fall through
+ // and be set using abconfig
+
+ translate_abook_perms_inbound($channel,$abook);
+
if($abconfig) {
// @fixme does not handle sync of del_abconfig
foreach($abconfig as $abc) {