1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-01 12:05:37 +02:00

- 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
This commit is contained in:
Nils Adermann 2006-06-17 18:39:34 +00:00
parent 4b1af3e32c
commit 20a27095bd

View File

@ -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]))