From ae0bf42808d9af32b2895d26a207086d4b0df82a Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Fri, 15 Jun 2007 11:07:25 +0000 Subject: Bug #12337 git-svn-id: file:///svn/phpbb/trunk@7758 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/auth.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'phpBB/includes/acp/auth.php') diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index 669613c589..77b199b8a5 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -587,7 +587,8 @@ class auth_admin extends auth // Get forum names $sql = 'SELECT forum_id, forum_name FROM ' . FORUMS_TABLE . ' - WHERE ' . $db->sql_in_set('forum_id', array_keys($hold_ary)); + WHERE ' . $db->sql_in_set('forum_id', array_keys($hold_ary)) . ' + ORDER BY left_id'; $result = $db->sql_query($sql); $forum_names = array(); @@ -597,16 +598,12 @@ class auth_admin extends auth } $db->sql_freeresult($result); - foreach ($hold_ary as $forum_id => $auth_ary) + foreach ($forum_names as $forum_id => $forum_name) { - // If there is no forum present the database holds auth information for a non-existent forum... continue then - if ($forum_id && !isset($forum_names[$forum_id])) - { - continue; - } + $auth_ary = $hold_ary[$forum_id]; $template->assign_block_vars('role_mask', array( - 'NAME' => ($forum_id == 0) ? $user->lang['GLOBAL_MASK'] : $forum_names[$forum_id], + 'NAME' => ($forum_id == 0) ? $user->lang['GLOBAL_MASK'] : $forum_name, 'FORUM_ID' => $forum_id) ); -- cgit v1.2.1