1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-08 08:35:31 +02:00

[ticket/9687] Some more code cleanup after code review

PHPBB3-9687
This commit is contained in:
Marc Alexander 2023-11-06 20:30:59 +01:00
parent 13361a3b4b
commit 58b777b51c
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
2 changed files with 4 additions and 3 deletions

View File

@ -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'),

View File

@ -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 */