From 79137c312c15638a380adacb18a2d7194f42f09d Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 14 Sep 2006 14:57:29 +0000 Subject: - 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 --- phpBB/includes/functions_admin.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'phpBB/includes/functions_admin.php') diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 49bad121e1..2f2e333c78 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2304,6 +2304,32 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id return; } +/** +* 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); +} + /** * Lists warned users */ -- cgit v1.2.1