1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 21:54:00 +02:00

- Fix some bugs

- fixed retrieving of permissions if the LIKE statement is used as well as proper supporting (needs testing on mssql)


git-svn-id: file:///svn/phpbb/trunk@6366 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-09-14 14:57:29 +00:00
parent 665adc1722
commit 79137c312c
11 changed files with 221 additions and 74 deletions

View File

@@ -651,7 +651,7 @@ class acp_permissions
// Remove users who are now moderators or admins from everyones foes list
if ($permission_type == 'm_' || $permission_type == 'a_')
{
$this->update_foes();
update_foes();
}
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_id, $forum_id);
@@ -718,7 +718,7 @@ class acp_permissions
// Remove users who are now moderators or admins from everyones foes list
if ($permission_type == 'm_' || $permission_type == 'a_')
{
$this->update_foes();
update_foes();
}
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_ids, $forum_ids);
@@ -847,32 +847,6 @@ class acp_permissions
}
}
/**
* Update foes - remove moderators and administrators from foe lists...
*/
function update_foes()
{
global $db, $auth;
$perms = array();
foreach ($auth->acl_get_list(false, array('a_', 'm_'), false) as $forum_id => $forum_ary)
{
foreach ($forum_ary as $auth_option => $user_ary)
{
$perms = array_merge($perms, $user_ary);
}
}
if (sizeof($perms))
{
$sql = 'DELETE FROM ' . ZEBRA_TABLE . '
WHERE ' . $db->sql_in_set('zebra_id', array_unique($perms)) . '
AND foe = 1';
$db->sql_query($sql);
}
unset($perms);
}
/**
* Display a complete trace tree for the selected permission to determine where settings are set/unset
*/