aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2007-06-15 11:07:25 +0000
committerHenry Sudhof <kellanved@phpbb.com>2007-06-15 11:07:25 +0000
commitae0bf42808d9af32b2895d26a207086d4b0df82a (patch)
treebc31391db1a7dce94737e9684315fbe2de207ed9
parent8b9ae084490ea32c3722da533777109121ab3bf9 (diff)
downloadforums-ae0bf42808d9af32b2895d26a207086d4b0df82a.tar
forums-ae0bf42808d9af32b2895d26a207086d4b0df82a.tar.gz
forums-ae0bf42808d9af32b2895d26a207086d4b0df82a.tar.bz2
forums-ae0bf42808d9af32b2895d26a207086d4b0df82a.tar.xz
forums-ae0bf42808d9af32b2895d26a207086d4b0df82a.zip
Bug #12337
git-svn-id: file:///svn/phpbb/trunk@7758 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/docs/CHANGELOG.html4
-rw-r--r--phpBB/includes/acp/auth.php13
2 files changed, 8 insertions, 9 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 583b22804b..07f33f3dbd 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -274,7 +274,9 @@ p a {
<li>[Fix] Correctly re-assign query result id after seeking rows (MSSQL/Firebird) (Bug #12369)</li>
<li>[Feature] Make effect of a changed hideonline permission instantaneous</li>
<li>[Fix] Do not overwrite larger memory values in the installer (Bug #12195)</li>
- </ul>
+ <li>[Fix] Order forums on role permission mask (Bug #12337)</li>
+
+</ul>
</div>
<a href="#top">Top</a>
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)
);