diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-10-18 17:44:02 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-10-18 17:44:02 +0000 |
commit | 6e530cb85128e5121606493dcad0962d7c5c1499 (patch) | |
tree | 3c3c06d8d9f1ca98e55491a2c9d3e87b0a2b3b25 /phpBB/includes/functions_user.php | |
parent | 7b1a8511ce1ae8e240720afe253618fb0866cac2 (diff) | |
download | forums-6e530cb85128e5121606493dcad0962d7c5c1499.tar forums-6e530cb85128e5121606493dcad0962d7c5c1499.tar.gz forums-6e530cb85128e5121606493dcad0962d7c5c1499.tar.bz2 forums-6e530cb85128e5121606493dcad0962d7c5c1499.tar.xz forums-6e530cb85128e5121606493dcad0962d7c5c1499.zip |
make the ban check perform a bit better :/
git-svn-id: file:///svn/phpbb/trunk@8202 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 8501175d5f..95a92d93af 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -659,7 +659,7 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL) */ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '') { - global $db, $user, $auth; + global $db, $user, $auth, $cache; // Delete stale bans $sql = 'DELETE FROM ' . BANLIST_TABLE . ' @@ -1043,10 +1043,14 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas add_log('admin', $log_entry . strtoupper($mode), $ban_reason, $ban_list_log); add_log('mod', 0, 0, $log_entry . strtoupper($mode), $ban_reason, $ban_list_log); + $cache->destroy('sql', BANLIST_TABLE); + return true; } - // There was nothing to ban/exclude + // There was nothing to ban/exclude. But destroying the cache because of the removal of stale bans. + $cache->destroy('sql', BANLIST_TABLE); + return false; } @@ -1055,7 +1059,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas */ function user_unban($mode, $ban) { - global $db, $user, $auth; + global $db, $user, $auth, $cache; // Delete stale bans $sql = 'DELETE FROM ' . BANLIST_TABLE . ' @@ -1112,6 +1116,8 @@ function user_unban($mode, $ban) add_log('mod', 0, 0, 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list); } + $cache->destroy('sql', BANLIST_TABLE); + return false; } |