git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9402 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2009-03-20 14:07:58 +00:00
parent 1afa921cb6
commit df619df149

View file

@ -23,7 +23,7 @@ class acp_permissions
{ {
var $u_action; var $u_action;
var $permission_dropdown; var $permission_dropdown;
function main($id, $mode) function main($id, $mode)
{ {
global $db, $user, $auth, $template, $cache; global $db, $user, $auth, $template, $cache;
@ -94,7 +94,7 @@ class acp_permissions
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
} }
// Map usernames to ids and vice versa // Map usernames to ids and vice versa
if ($usernames) if ($usernames)
{ {
@ -112,7 +112,7 @@ class acp_permissions
} }
} }
unset($username); unset($username);
// Build forum ids (of all forums are checked or subforum listing used) // Build forum ids (of all forums are checked or subforum listing used)
if ($all_forums) if ($all_forums)
{ {
@ -528,7 +528,7 @@ class acp_permissions
} }
continue; continue;
} }
if ($branch_there) if ($branch_there)
{ {
$s_options .= ' [' . $user->lang['PLUS_SUBFORUMS'] . ']'; $s_options .= ' [' . $user->lang['PLUS_SUBFORUMS'] . ']';
@ -539,14 +539,14 @@ class acp_permissions
return $s_options; return $s_options;
} }
/** /**
* Build dropdown field for changing permission types * Build dropdown field for changing permission types
*/ */
function build_permission_dropdown($options, $default_option, $permission_scope) function build_permission_dropdown($options, $default_option, $permission_scope)
{ {
global $user, $auth; global $user, $auth;
$s_dropdown_options = ''; $s_dropdown_options = '';
foreach ($options as $setting) foreach ($options as $setting)
{ {
@ -626,7 +626,7 @@ class acp_permissions
{ {
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
} }
$ug_id = $forum_id = 0; $ug_id = $forum_id = 0;
// We loop through the auth settings defined in our submit // We loop through the auth settings defined in our submit
@ -809,7 +809,7 @@ class acp_permissions
function remove_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id, &$forum_id) function remove_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id, &$forum_id)
{ {
global $user, $db, $auth; global $user, $db, $auth;
// User or group to be set? // User or group to be set?
$ug_type = (sizeof($user_id)) ? 'user' : 'group'; $ug_type = (sizeof($user_id)) ? 'user' : 'group';
@ -1150,7 +1150,11 @@ class acp_permissions
{ {
$sql_where = 'AND (' . $db->sql_in_set('a.auth_option_id', $option_ids) . ' OR ' . $db->sql_in_set('a.auth_role_id', $role_ids) . ')'; $sql_where = 'AND (' . $db->sql_in_set('a.auth_option_id', $option_ids) . ' OR ' . $db->sql_in_set('a.auth_role_id', $role_ids) . ')';
} }
else else if (sizeof($role_ids))
{
$sql_where = 'AND ' . $db->sql_in_set('a.auth_role_id', $role_ids);
}
else if (sizeof($option_ids))
{ {
$sql_where = 'AND ' . $db->sql_in_set('a.auth_option_id', $option_ids); $sql_where = 'AND ' . $db->sql_in_set('a.auth_option_id', $option_ids);
} }