diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-09-14 14:57:29 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-09-14 14:57:29 +0000 |
| commit | 79137c312c15638a380adacb18a2d7194f42f09d (patch) | |
| tree | a96cf32a8b8242484bee18db3e3a19ebfdfb3f25 /phpBB/includes/functions_admin.php | |
| parent | 665adc1722385e134ef20f8e470d5593a8be284b (diff) | |
| download | forums-79137c312c15638a380adacb18a2d7194f42f09d.tar forums-79137c312c15638a380adacb18a2d7194f42f09d.tar.gz forums-79137c312c15638a380adacb18a2d7194f42f09d.tar.bz2 forums-79137c312c15638a380adacb18a2d7194f42f09d.tar.xz forums-79137c312c15638a380adacb18a2d7194f42f09d.zip | |
- 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
Diffstat (limited to 'phpBB/includes/functions_admin.php')
| -rw-r--r-- | phpBB/includes/functions_admin.php | 26 |
1 files changed, 26 insertions, 0 deletions
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 @@ -2305,6 +2305,32 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id } /** +* 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 */ function view_warned_users(&$users, &$user_count, $limit = 0, $offset = 0, $limit_days = 0, $sort_by = 'user_warnings DESC') |
