diff options
author | redmatrix <mike@macgirvin.com> | 2016-08-26 16:01:33 -0700 |
---|---|---|
committer | redmatrix <mike@macgirvin.com> | 2016-08-26 16:02:04 -0700 |
commit | aea2fa1629692cc29f1070a66fbde9fb9ae837a6 (patch) | |
tree | aa83f0f866b8772669566d9df900170ce0d7dd06 /include | |
parent | 8e243edd20e758082c3c30fd3053bd9fb0d11dcf (diff) | |
download | volse-hubzilla-aea2fa1629692cc29f1070a66fbde9fb9ae837a6.tar.gz volse-hubzilla-aea2fa1629692cc29f1070a66fbde9fb9ae837a6.tar.bz2 volse-hubzilla-aea2fa1629692cc29f1070a66fbde9fb9ae837a6.zip |
issue #186 ...different check for pubforum with expert permissions
Diffstat (limited to 'include')
-rw-r--r-- | include/zot.php | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/include/zot.php b/include/zot.php index c3c924113..6187e8a61 100644 --- a/include/zot.php +++ b/include/zot.php @@ -3785,20 +3785,14 @@ function zotinfo($arr) { if($role === 'forum' || $role === 'repository') { $public_forum = true; } - elseif($ztarget_hash) { + else { // check if it has characteristics of a public forum based on custom permissions. - $t = q("select * from abconfig where abconfig.cat = 'my_perms' and abconfig.chan = %d and abconfig.xchan = '%s' and abconfig.k in ('tag_deliver', 'send_stream') ", - intval($e['channel_id']), - dbesc($ztarget_hash) - ); - - $ch = 0; - - if($t) { - foreach($t as $tt) { - if($tt['k'] == 'tag_deliver' && $tt['v'] == 1) + $m = \Zotlabs\Access\Permissions::FilledAutoperms($e['channel_id']); + if($m) { + foreach($m as $k => $v) { + if($k == 'tag_deliver' && intval($v) == 1) $ch ++; - if($tt['k'] == 'send_stream' && $tt['v'] == 0) + if($k == 'send_stream' && intval($v) == 0) $ch ++; } if($ch == 2) |