From b0c3e3958220c04cbb4f25f0c24b53b65a34e360 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 16 Jun 2006 16:54:51 +0000 Subject: - removed db cache (might re-appear, but for now we do not see the need for it) - all changes to styles/subsilver/template are purely cosmetic (no functional changes) - cosmetics - bugfixes - add index to modules table - use modules ordering code for forums too git-svn-id: file:///svn/phpbb/trunk@6073 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/auth.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'phpBB/includes/acp/auth.php') diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index 0888cae128..b92030b123 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -124,6 +124,7 @@ class auth_admin extends auth FROM ' . USERS_TABLE . ' WHERE user_id IN (' . implode(',', $ug_id) . ')'; $result = $db->sql_query($sql); + while ($userdata = $db->sql_fetchrow($result)) { if ($user->data['user_id'] != $user_id) @@ -148,6 +149,7 @@ class auth_admin extends auth } } $db->sql_freeresult($result); + unset($userdata); unset($auth2); } @@ -393,9 +395,9 @@ class auth_admin extends auth $groups[$row['group_id']] = $row; } $db->sql_freeresult($result); - + $memberships = group_memberships(false, array_keys($hold_ary), false); - + // User is not a member of any group? Bad admin, bad bad admin... if ($memberships) { @@ -546,6 +548,7 @@ class auth_admin extends auth default: $folder_image = ($forum_names_ary[$forum_id]['left_id'] + 1 != $forum_names_ary[$forum_id]['right_id']) ? '' . $user->lang['SUBFORUM'] . '' : '' . $user->lang['FOLDER'] . ''; + break; } } } @@ -596,7 +599,7 @@ class auth_admin extends auth 'NAME' => ($forum_id == 0) ? $user->lang['GLOBAL_MASK'] : $forum_names[$forum_id], 'FORUM_ID' => $forum_id) ); - + if (isset($auth_ary['users']) && sizeof($auth_ary['users'])) { $sql = 'SELECT user_id, username @@ -740,6 +743,7 @@ class auth_admin extends auth } $cache->destroy('acl_options'); + $this->acl_clear_prefetch(); return true; } @@ -762,7 +766,7 @@ class auth_admin extends auth { $ug_id = array($ug_id); } - + $ug_id_sql = 'IN (' . implode(', ', array_map('intval', $ug_id)) . ')'; $forum_sql = 'IN (' . implode(', ', array_map('intval', $forum_id)) . ') '; @@ -1181,7 +1185,7 @@ class auth_admin extends auth * The other user is always able to revert back to his permission set. * This function does not check for lower/higher permissions, it is possible for the user to gain * "more" permissions by this. - * + * Admin permissions will not be copied. */ function ghost_permissions($from_user_id, $to_user_id) { -- cgit v1.2.1