aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-20 17:45:23 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-20 17:45:23 -0700
commit35f09f4f746fa53fc3c495f71e0f8379c24207fa (patch)
treec1f1dda79081e36946053fe5af0e98167b5be86e /include
parent9de8df496a98019d4b4a3e7549e0d5047dd87024 (diff)
downloadvolse-hubzilla-35f09f4f746fa53fc3c495f71e0f8379c24207fa.tar.gz
volse-hubzilla-35f09f4f746fa53fc3c495f71e0f8379c24207fa.tar.bz2
volse-hubzilla-35f09f4f746fa53fc3c495f71e0f8379c24207fa.zip
remove system flags from channel import packet
Diffstat (limited to 'include')
-rw-r--r--include/zot.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/zot.php b/include/zot.php
index 57645f631..db53ccfc5 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2925,11 +2925,15 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
}
if(array_key_exists('channel',$arr) && is_array($arr['channel']) && count($arr['channel'])) {
- if(array_key_exists('channel_removed',$arr['channel']))
- $arr['channel_pageflags'] |= PAGE_REMOVED;
- if(array_key_exists('channel_system',$arr['channel']))
- $arr['channel_pageflags'] |= PAGE_SYSTEM;
-
+
+ // These flags cannot be sync'd.
+ // If these bits aren't set locally, remove the bits from the incoming flags.
+
+ if(! ($channel['channel_pageflags'] & PAGE_REMOVED))
+ $arr['channel_pageflags'] = $arr['channel_pageflags'] & PAGE_REMOVED;
+ if(! ($channel['channel_pageflags'] & PAGE_SYSTEM))
+ $arr['channel_pageflags'] = $arr['channel_pageflags'] & PAGE_SYSTEM;
+
$disallowed = array('channel_id','channel_account_id','channel_primary','channel_prvkey', 'channel_address', 'channel_notifyflags', 'channel_removed', 'channel_system');
$clean = array();