diff options
author | friendica <info@friendica.com> | 2014-11-10 15:21:04 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-11-10 15:21:04 -0800 |
commit | 62094652333514e92f9f00699e14b9f49680bb64 (patch) | |
tree | f61a8410d6c469c5ae5b7b3aa69cfb8dd5a956a7 /include/zot.php | |
parent | 0b4575a40b5412f0497c50560b0510a304599086 (diff) | |
download | volse-hubzilla-62094652333514e92f9f00699e14b9f49680bb64.tar.gz volse-hubzilla-62094652333514e92f9f00699e14b9f49680bb64.tar.bz2 volse-hubzilla-62094652333514e92f9f00699e14b9f49680bb64.zip |
add public forum identification to libzot. No attempt is made to identify other types of forums or weird custom channel permissions. If the channel is auto-accept and taggable, it's a public forum.
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php index bdc1f607f..ac68c0035 100644 --- a/include/zot.php +++ b/include/zot.php @@ -699,10 +699,14 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) { $dirmode = get_config('system','directory_mode'); - if((($arr['site']['directory_mode'] === 'standalone') || ($dirmode & DIRECTORY_MODE_STANDALONE)) -&& ($arr['site']['url'] != z_root())) + if((($arr['site']['directory_mode'] === 'standalone') || ($dirmode & DIRECTORY_MODE_STANDALONE)) && ($arr['site']['url'] != z_root())) $arr['searchable'] = false; + $public_forum = (($r[0]['xchan_flags'] & XCHAN_FLAGS_PUBFORUM) ? true : false); + $pubforum_changed = ((intval($public_forum) != intval($arr['public_forum'])) ? true : false); + if($pubforum_changed) + $new_flags = $r[0]['xchan_flags'] ^ XCHAN_FLAGS_PUBFORUM; + $hidden = (1 - intval($arr['searchable'])); // Be careful - XCHAN_FLAGS_HIDDEN should evaluate to 1 |