aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-07-04 19:51:16 -0700
committerzotlabs <mike@macgirvin.com>2018-07-04 19:51:16 -0700
commit51a2e64a897e5afdb3e607915534a1562a215563 (patch)
treeddc8d572a0529171084d5ddbbbe5f5f5c97733cb /include/zot.php
parentbf24a106ce285d2fa9b6afb0c7a65dd14741c48b (diff)
downloadvolse-hubzilla-51a2e64a897e5afdb3e607915534a1562a215563.tar.gz
volse-hubzilla-51a2e64a897e5afdb3e607915534a1562a215563.tar.bz2
volse-hubzilla-51a2e64a897e5afdb3e607915534a1562a215563.zip
issue syncing pageflags
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/include/zot.php b/include/zot.php
index 14c9f6ae5..5c74947d6 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -3548,15 +3548,12 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
if(array_key_exists('channel_pageflags',$arr['channel']) && intval($arr['channel']['channel_pageflags'])) {
- // These flags cannot be sync'd.
- // remove the bits from the incoming flags.
+ // Several pageflags are site-specific and cannot be sync'd.
+ // Only allow those bits which are shareable from the remote and then
+ // logically OR with the local flags
- // These correspond to PAGE_REMOVED and PAGE_SYSTEM on redmatrix
-
- if($arr['channel']['channel_pageflags'] & 0x8000)
- $arr['channel']['channel_pageflags'] = $arr['channel']['channel_pageflags'] - 0x8000;
- if($arr['channel']['channel_pageflags'] & 0x1000)
- $arr['channel']['channel_pageflags'] = $arr['channel']['channel_pageflags'] - 0x1000;
+ $arr['channel']['channel_pageflags'] = $arr['channel']['channel_pageflags'] & (PAGE_HIDDEN|PAGE_AUTOCONNECT|PAGE_APPLICATION|PAGE_PREMIUM|PAGE_ADULT);
+ $arr['channel']['channel_pageflags'] = $arr['channel']['channel_pageflags'] | $channel['channel_pageflags'];
}
$disallowed = [