diff --git a/phpBB/admin/admin_permissions.php b/phpBB/admin/admin_permissions.php index a78f5aff98..f7c1a42c8c 100644 --- a/phpBB/admin/admin_permissions.php +++ b/phpBB/admin/admin_permissions.php @@ -258,42 +258,14 @@ if ( !empty($forum_id) || $mode == 'administrators' ) case 'administrators': - $where_user_sql = ''; - if ( !empty($HTTP_POST_VARS['users']) ) + $sql = "SELECT group_id, group_name + FROM " . GROUPS_TABLE; + $result = $db->sql_query($sql); + + $group_list = ''; + while ( $row = $db->sql_fetchrow($result) ) { - if ( is_array($HTTP_POST_VARS['users']) ) - { - foreach ($HTTP_POST_VARS['users'] as $user_id) - { - $where_user_sql .= ( ( $where_user_sql != '' ) ? ', ' : '' ) . intval($user_id); - } - } - else - { - $where_user_sql = intval($HTTP_POST_VARS['users']); - } - - $where_user_sql = " AND u.user_id IN ($where_user_sql)"; - } - - $discrete_user_sql = ( empty($HTTP_POST_VARS['discrete']) || empty($HTTP_POST_VARS['users']) || is_array($HTTP_POST_VARS['users']) ) ? ' DISTINCT ' : 'ao.auth_option, '; - - $where_groups_sql = ''; - if ( !empty($HTTP_POST_VARS['groups']) ) - { - if ( is_array($HTTP_POST_VARS['groups']) ) - { - foreach ($HTTP_POST_VARS['groups'] as $group_id) - { - $where_groups_sql .= ( ( $where_groups_sql != '' ) ? ', ' : '' ) . intval($group_idf); - } - } - else - { - $where_groups_sql = intval($HTTP_POST_VARS['groups']); - } - - $where_groups_sql = " AND g.group_id IN ($where_groups_sql)"; + $group_list .= ''; } ?> @@ -335,6 +307,17 @@ if ( !empty($forum_id) || $mode == 'administrators' ) } else { + $where_user_sql = ''; + if ( !empty($HTTP_POST_VARS['users']) ) + { + foreach ($HTTP_POST_VARS['users'] as $user_id) + { + $where_user_sql .= ( ( $where_user_sql != '' ) ? ', ' : '' ) . intval($user_id); + } + + $where_user_sql = " AND u.user_id IN ($where_user_sql)"; + } + $sql = "SELECT auth_option FROM " . ACL_OPTIONS_TABLE . " WHERE auth_type LIKE 'admin'"; @@ -414,17 +397,6 @@ if ( !empty($forum_id) || $mode == 'administrators' ) - - - - - - - - - - -