diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-02-28 15:25:18 -0600 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-02-28 15:25:18 -0600 |
commit | b41b1a36d1ee85abc05c22b443db7b10af077f7e (patch) | |
tree | 194348977ff190477d93dd83c4a13d53d50dcc8a | |
parent | 247ecdf11bd404f4842a93afbf9c5dae9d541f55 (diff) | |
download | forums-b41b1a36d1ee85abc05c22b443db7b10af077f7e.tar forums-b41b1a36d1ee85abc05c22b443db7b10af077f7e.tar.gz forums-b41b1a36d1ee85abc05c22b443db7b10af077f7e.tar.bz2 forums-b41b1a36d1ee85abc05c22b443db7b10af077f7e.tar.xz forums-b41b1a36d1ee85abc05c22b443db7b10af077f7e.zip |
[ticket/11103] Case time in queries as an int
PHPBB3-11103
-rw-r--r-- | phpBB/includes/notification/manager.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/notification/manager.php b/phpBB/includes/notification/manager.php index 5c1016335a..ff83d4bb37 100644 --- a/phpBB/includes/notification/manager.php +++ b/phpBB/includes/notification/manager.php @@ -254,7 +254,7 @@ class phpbb_notification_manager $sql = 'UPDATE ' . $this->notifications_table . " 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_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); @@ -285,7 +285,7 @@ class phpbb_notification_manager $sql = 'UPDATE ' . $this->notifications_table . " SET notification_read = 1 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) : '') . (($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); @@ -303,7 +303,7 @@ class phpbb_notification_manager $sql = 'UPDATE ' . $this->notifications_table . " 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); $this->db->sql_query($sql); } |