mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-08 16:45:19 +02:00
[ticket/9687] Some more code cleanup after code review
PHPBB3-9687
This commit is contained in:
parent
13361a3b4b
commit
58b777b51c
@ -186,7 +186,7 @@ class acp_ban
|
||||
'L_BAN_CELL' => $l_ban_cell,
|
||||
'L_NO_BAN_CELL' => $l_no_ban_cell,
|
||||
|
||||
'S_USERNAME_BAN' => $mode == 'user',
|
||||
'S_USERNAME_BAN' => $mode == 'user' ? true : false,
|
||||
|
||||
'U_ACTION' => $this->u_action,
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_ban&field=ban'),
|
||||
|
@ -117,7 +117,7 @@ class manager
|
||||
// Prevent duplicate bans
|
||||
$sql = 'DELETE FROM ' . $this->bans_table . "
|
||||
WHERE ban_mode = '" . $this->db->sql_escape($mode) . "'
|
||||
AND " . $this->db->sql_in_set('ban_item', $ban_items, false, true);
|
||||
AND " . $this->db->sql_in_set('ban_item', $ban_items, false, true);
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
$insert_array = [];
|
||||
@ -468,7 +468,8 @@ class manager
|
||||
{
|
||||
// Delete stale bans
|
||||
$sql = 'DELETE FROM ' . $this->bans_table . '
|
||||
WHERE ban_end > 0 AND ban_end < ' . (int) time();
|
||||
WHERE ban_end > 0
|
||||
AND ban_end < ' . (int) time();
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
/** @var type_interface $type */
|
||||
|
Loading…
x
Reference in New Issue
Block a user