diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-28 17:10:07 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-28 17:10:07 +0000 |
commit | 7e47a8ddb023b3851d9f2d1dd153e535cb41172d (patch) | |
tree | 5968fe5a259b63d7f3330c808a6f5026625d3f8f /phpBB/includes/functions_admin.php | |
parent | fe9590cf5a3946260d61748cfc2ac0e13f10c23b (diff) | |
download | forums-7e47a8ddb023b3851d9f2d1dd153e535cb41172d.tar forums-7e47a8ddb023b3851d9f2d1dd153e535cb41172d.tar.gz forums-7e47a8ddb023b3851d9f2d1dd153e535cb41172d.tar.bz2 forums-7e47a8ddb023b3851d9f2d1dd153e535cb41172d.tar.xz forums-7e47a8ddb023b3851d9f2d1dd153e535cb41172d.zip |
added ability to hide coppa groups (mainly applied to permission screens)
git-svn-id: file:///svn/phpbb/trunk@5744 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 8391fcffc4..240336583f 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -209,12 +209,16 @@ function size_select_options($size_compare) */ function group_select_options($group_id, $exclude_ids = false) { - global $db, $user; + global $db, $user, $config; + + $exclude_sql = ($exclude_ids !== false && sizeof($exclude_ids)) ? 'WHERE group_id NOT IN (' . implode(', ', array_map('intval', $exclude_ids)) . ')' : ''; + $sql_and = ($config['coppa_hide_groups']) ? (($exclude_sql) ? ' AND ' : ' WHERE ') . "group_name NOT IN ('INACTIVE_COPPA', 'REGISTERED_COPPA')" : ''; $sql = 'SELECT group_id, group_name, group_type - FROM ' . GROUPS_TABLE . ' - ' . (($exclude_ids !== false && sizeof($exclude_ids)) ? 'WHERE group_id NOT IN (' . implode(', ', array_map('intval', $exclude_ids)) . ')' : '') . ' - ORDER BY group_type DESC, group_name ASC'; + FROM ' . GROUPS_TABLE . " + $exclude_sql + $sql_and + ORDER BY group_type DESC, group_name ASC"; $result = $db->sql_query($sql); $s_group_options = ''; |