mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 13:30:25 +02:00
Fix bug #47825 - Banning an already banned user states to be successful, but has no effect - Patch by Pyramide
Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9840 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1016,7 +1016,17 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
$banlist_ary = array_unique(array_diff($banlist_ary, $banlist_ary_tmp));
|
||||
$banlist_ary_tmp = array_intersect($banlist_ary, $banlist_ary_tmp);
|
||||
|
||||
if (sizeof($banlist_ary_tmp))
|
||||
{
|
||||
// One or more entities are already banned/excluded, delete the existing bans, so they can be re-inserted with the given new length
|
||||
$sql = 'DELETE FROM ' . BANLIST_TABLE . '
|
||||
WHERE ' . $db->sql_in_set($type, $banlist_ary_tmp) . '
|
||||
AND ban_exclude = ' . (int) $ban_exclude;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
unset($banlist_ary_tmp);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
Reference in New Issue
Block a user