Author: nickvergessen
Date: Fri Jul 24 08:49:51 2009
New Revision: 9840
Log:
Fix bug #47825 - Banning an already banned user states to be successful, but has no effect - Patch by Pyramide
Authorised by: AcydBurn
Modified:
branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html
branches/phpBB-3_0_0/phpBB/includes/functions_user.php
Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html
==============================================================================
*** branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html (original)
--- branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Fri Jul 24 08:49:51 2009
***************
*** 171,176 ****
--- 171,177 ----
<li>[Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags)</li>
<li>[Fix] Be less strict with FTP daemons when getting directory filelists. (Bug #46295)</li>
<li>[Fix] Fix set_custom_template for database-stored styles (Bug #40515 - Patch by nickvergessen)</li>
+ <li>[Fix] Banning an already banned user states to be successful, but has no effect (Bug #47825 - Patch by Pyramide)</li>
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
<li>[Change] Template engine now permits to a limited extent variable includes.</li>
Modified: branches/phpBB-3_0_0/phpBB/includes/functions_user.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/functions_user.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/functions_user.php Fri Jul 24 08:49:51 2009
***************
*** 1016,1022 ****
}
while ($row = $db->sql_fetchrow($result));
! $banlist_ary = array_unique(array_diff($banlist_ary, $banlist_ary_tmp));
unset($banlist_ary_tmp);
}
$db->sql_freeresult($result);
--- 1016,1032 ----
}
while ($row = $db->sql_fetchrow($result));
! $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);
|