diff options
author | Nils Adermann <naderman@naderman.de> | 2006-06-17 18:39:34 +0000 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2006-06-17 18:39:34 +0000 |
commit | 20a27095bd93937384b2c4fcbadb7a77936a1143 (patch) | |
tree | 0f061b3a2942680722034374b8583966815b8ed0 /phpBB/includes/acp/auth.php | |
parent | 4b1af3e32c2bd32bcb7c8e93174067959ceee225 (diff) | |
download | forums-20a27095bd93937384b2c4fcbadb7a77936a1143.tar forums-20a27095bd93937384b2c4fcbadb7a77936a1143.tar.gz forums-20a27095bd93937384b2c4fcbadb7a77936a1143.tar.bz2 forums-20a27095bd93937384b2c4fcbadb7a77936a1143.tar.xz forums-20a27095bd93937384b2c4fcbadb7a77936a1143.zip |
- correctly display user forum permissions if all forums are selected [Bug #2285]
- correctly display user forum permissions if multiple users are selected
git-svn-id: file:///svn/phpbb/trunk@6091 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/auth.php')
-rw-r--r-- | phpBB/includes/acp/auth.php | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index b92030b123..db02e5dd97 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -116,6 +116,20 @@ class auth_admin extends auth // Only those options we need $compare_options = array_diff(preg_replace('/^((?!' . $auth_option . ').+)|(' . $auth_option . ')$/', '', array_keys($this->acl_options[$scope])), array('')); + // If forum_ids is false and the scope is local we actually want to have all forums within the array + if ($scope == 'local' && !sizeof($forum_ids)) + { + $sql = 'SELECT forum_id + FROM ' . FORUMS_TABLE; + $result = $db->sql_query($sql, 120); + + while ($row = $db->sql_fetchrow($result)) + { + $forum_ids[] = $row['forum_id']; + } + $db->sql_freeresult($result); + } + if ($view_user_mask) { $auth2 = null; @@ -127,7 +141,7 @@ class auth_admin extends auth while ($userdata = $db->sql_fetchrow($result)) { - if ($user->data['user_id'] != $user_id) + if ($user->data['user_id'] != $userdata['user_id']) { $auth2 = new auth(); $auth2->acl($userdata); @@ -138,6 +152,7 @@ class auth_admin extends auth $auth2 = &$auth; } + $hold_ary[$userdata['user_id']] = array(); foreach ($forum_ids as $f_id) { @@ -154,20 +169,6 @@ class auth_admin extends auth unset($auth2); } - // If forum_ids is false and the scope is local we actually want to have all forums within the array - if ($scope == 'local' && !sizeof($forum_ids)) - { - $sql = 'SELECT forum_id - FROM ' . FORUMS_TABLE; - $result = $db->sql_query($sql, 120); - - while ($row = $db->sql_fetchrow($result)) - { - $forum_ids[] = $row['forum_id']; - } - $db->sql_freeresult($result); - } - foreach ($ug_id as $_id) { if (!isset($hold_ary[$_id])) |