diff options
author | zotlabs <mike@macgirvin.com> | 2019-03-06 01:06:42 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-03-06 09:49:40 +0100 |
commit | 571e9bf26aec8b12f7e2d1d7186d1f4810bbb914 (patch) | |
tree | f0414a28556dcf6b5069b3faef690509eb86798b | |
parent | c4714e95b6d51139889e787efaf7f046f32f58fe (diff) | |
download | volse-hubzilla-571e9bf26aec8b12f7e2d1d7186d1f4810bbb914.tar.gz volse-hubzilla-571e9bf26aec8b12f7e2d1d7186d1f4810bbb914.tar.bz2 volse-hubzilla-571e9bf26aec8b12f7e2d1d7186d1f4810bbb914.zip |
channel_type is not integer
(cherry picked from commit 26e7da0b969c834cc6c2ff7c00713c7be05cb5c4)
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index 22bbdf477..c30df0a1a 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -685,14 +685,26 @@ class Libzot { $adult_changed = 1; if(intval($r[0]['xchan_deleted']) != intval($arr['deleted'])) $deleted_changed = 1; + + // new style 6-MAR-2019 + + if(array_key_exists('channel_type',$arr)) { + if($arr['channel_type'] === 'collection') { + // do nothing at this time. + } + elseif($arr['channel_type'] === 'group') { + $arr['public_forum'] = 1; + } + else { + $arr['public_forum'] = 0; + } + } + // old style + if(intval($r[0]['xchan_pubforum']) != intval($arr['public_forum'])) $pubforum_changed = 1; - // new style 6-MAR-2019 - if(array_key_exists('channel_type',$arr) && intval($arr['channel_type']) < 2 && intval($r[0]['xchan_pubforum']) !== intval($arr['channel_type'])) { - $pubforum_changed = 1; - $arr['public_forum'] = $arr['channel_type']; - } + if($arr['protocols']) { $protocols = implode(',',$arr['protocols']); |