diff options
author | zotlabs <mike@macgirvin.com> | 2018-07-04 19:51:16 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-07-04 19:53:51 -0700 |
commit | f808a2b5a167f60a552924a58a33750ca53e4368 (patch) | |
tree | 682832d4062df2d84584714c27eded8075c43709 | |
parent | 3fc955abfdfdc098af1c8889b62817f44c78cdee (diff) | |
download | volse-hubzilla-f808a2b5a167f60a552924a58a33750ca53e4368.tar.gz volse-hubzilla-f808a2b5a167f60a552924a58a33750ca53e4368.tar.bz2 volse-hubzilla-f808a2b5a167f60a552924a58a33750ca53e4368.zip |
issue syncing pageflags
-rw-r--r-- | include/zot.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/include/zot.php b/include/zot.php index fd8247234..8e14bb37c 100644 --- a/include/zot.php +++ b/include/zot.php @@ -3543,15 +3543,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 = [ |