aboutsummaryrefslogtreecommitdiffstats
path: root/include/acl_selectors.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-01-13 09:50:53 +0000
committerMario <mario@mariovavti.com>2021-01-13 09:50:53 +0000
commit5eefdc6485b2f6082f6fe5dfd6f1731fae7e3a2a (patch)
tree7521f4800e393538d19c393c6f495ea2d41cbf5a /include/acl_selectors.php
parent0bc4c7d1a0e4348018e533be600ad1c648fd97fb (diff)
parent4d2bcbc5837a7d99dc541595ca8087c335242af0 (diff)
downloadvolse-hubzilla-5eefdc6485b2f6082f6fe5dfd6f1731fae7e3a2a.tar.gz
volse-hubzilla-5eefdc6485b2f6082f6fe5dfd6f1731fae7e3a2a.tar.bz2
volse-hubzilla-5eefdc6485b2f6082f6fe5dfd6f1731fae7e3a2a.zip
Merge branch '5.2RC'5.2
Diffstat (limited to 'include/acl_selectors.php')
-rw-r--r--include/acl_selectors.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index a3476439a..8da46649c 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -82,7 +82,6 @@ function populate_acl($defaults = null,$show_jotnets = true, $emptyACL_descripti
$r = q("SELECT id, hash, gname FROM pgrp WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
intval(local_channel())
);
-
if($r) {
$groups .= '<optgroup label = "' . t('Privacy Groups').'">';
foreach($r as $rr) {
@@ -110,13 +109,23 @@ function populate_acl($defaults = null,$show_jotnets = true, $emptyACL_descripti
if($dialog_description) {
$forums = get_forum_channels(local_channel(),1);
if($forums) {
- $groups .= '<optgroup label = "' . t('Forums').'">';
+ $forums_count = 0;
+ $forum_otions = '';
foreach($forums as $f) {
+ if($f['no_post_perms'])
+ continue;
+
$private = (($f['private_forum']) ? ' (' . t('Private Forum') . ')' : '');
$selected = (($single_group && $f['hash'] === $allow_cid[0]) ? ' selected = "selected" ' : '');
- $groups .= '<option id="^' . $f['abook_id'] . '" value="^' . $f['xchan_hash'] . '"' . $selected . '>' . $f['xchan_name'] . $private . '</option>' . "\r\n";
+ $forum_otions .= '<option id="^' . $f['abook_id'] . '" value="^' . $f['xchan_hash'] . '"' . $selected . '>' . $f['xchan_name'] . $private . '</option>' . "\r\n";
+ $forums_count++;
}
- $groups .= '</optgroup>';
+ if($forums_count) {
+ $groups .= '<optgroup label = "' . t('Forums').'">';
+ $groups .= $forum_otions;
+ $groups .= '</optgroup>';
+ }
+
}
}