mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11103] Case time in queries as an int
PHPBB3-11103
This commit is contained in:
parent
247ecdf11b
commit
b41b1a36d1
1 changed files with 3 additions and 3 deletions
|
@ -254,7 +254,7 @@ class phpbb_notification_manager
|
||||||
|
|
||||||
$sql = 'UPDATE ' . $this->notifications_table . "
|
$sql = 'UPDATE ' . $this->notifications_table . "
|
||||||
SET notification_read = 1
|
SET notification_read = 1
|
||||||
WHERE notification_time <= " . $time .
|
WHERE notification_time <= " . (int) $time .
|
||||||
(($item_type !== false) ? ' AND ' . (is_array($item_type) ? $this->db->sql_in_set('item_type', $item_type) : " item_type = '" . $this->db->sql_escape($item_type) . "'") : '') .
|
(($item_type !== false) ? ' AND ' . (is_array($item_type) ? $this->db->sql_in_set('item_type', $item_type) : " item_type = '" . $this->db->sql_escape($item_type) . "'") : '') .
|
||||||
(($item_id !== false) ? ' AND ' . (is_array($item_id) ? $this->db->sql_in_set('item_id', $item_id) : 'item_id = ' . (int) $item_id) : '');
|
(($item_id !== false) ? ' AND ' . (is_array($item_id) ? $this->db->sql_in_set('item_id', $item_id) : 'item_id = ' . (int) $item_id) : '');
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
|
@ -285,7 +285,7 @@ class phpbb_notification_manager
|
||||||
$sql = 'UPDATE ' . $this->notifications_table . "
|
$sql = 'UPDATE ' . $this->notifications_table . "
|
||||||
SET notification_read = 1
|
SET notification_read = 1
|
||||||
WHERE item_type = '" . $this->db->sql_escape($item_type) . "'
|
WHERE item_type = '" . $this->db->sql_escape($item_type) . "'
|
||||||
AND notification_time <= " . $time .
|
AND notification_time <= " . (int) $time .
|
||||||
(($item_parent_id !== false) ? ' AND ' . (is_array($item_parent_id) ? $this->db->sql_in_set('item_parent_id', $item_parent_id) : 'item_parent_id = ' . (int) $item_parent_id) : '') .
|
(($item_parent_id !== false) ? ' AND ' . (is_array($item_parent_id) ? $this->db->sql_in_set('item_parent_id', $item_parent_id) : 'item_parent_id = ' . (int) $item_parent_id) : '') .
|
||||||
(($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '');
|
(($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '');
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
|
@ -303,7 +303,7 @@ class phpbb_notification_manager
|
||||||
|
|
||||||
$sql = 'UPDATE ' . $this->notifications_table . "
|
$sql = 'UPDATE ' . $this->notifications_table . "
|
||||||
SET notification_read = 1
|
SET notification_read = 1
|
||||||
WHERE notification_time <= " . $time . '
|
WHERE notification_time <= " . (int) $time . '
|
||||||
AND ' . ((is_array($notification_id)) ? $this->db->sql_in_set('notification_id', $notification_id) : 'notification_id = ' . (int) $notification_id);
|
AND ' . ((is_array($notification_id)) ? $this->db->sql_in_set('notification_id', $notification_id) : 'notification_id = ' . (int) $notification_id);
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue