issue #186 ...different check for pubforum with expert permissions
This commit is contained in:
parent
8e243edd20
commit
aea2fa1629
@ -3785,20 +3785,14 @@ function zotinfo($arr) {
|
|||||||
if($role === 'forum' || $role === 'repository') {
|
if($role === 'forum' || $role === 'repository') {
|
||||||
$public_forum = true;
|
$public_forum = true;
|
||||||
}
|
}
|
||||||
elseif($ztarget_hash) {
|
else {
|
||||||
// check if it has characteristics of a public forum based on custom permissions.
|
// 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') ",
|
$m = \Zotlabs\Access\Permissions::FilledAutoperms($e['channel_id']);
|
||||||
intval($e['channel_id']),
|
if($m) {
|
||||||
dbesc($ztarget_hash)
|
foreach($m as $k => $v) {
|
||||||
);
|
if($k == 'tag_deliver' && intval($v) == 1)
|
||||||
|
|
||||||
$ch = 0;
|
|
||||||
|
|
||||||
if($t) {
|
|
||||||
foreach($t as $tt) {
|
|
||||||
if($tt['k'] == 'tag_deliver' && $tt['v'] == 1)
|
|
||||||
$ch ++;
|
$ch ++;
|
||||||
if($tt['k'] == 'send_stream' && $tt['v'] == 0)
|
if($k == 'send_stream' && intval($v) == 0)
|
||||||
$ch ++;
|
$ch ++;
|
||||||
}
|
}
|
||||||
if($ch == 2)
|
if($ch == 2)
|
||||||
|
Reference in New Issue
Block a user