From 6dddc22ec7241cdf32cd28788ff04fb296648203 Mon Sep 17 00:00:00 2001 From: David King <imkingdavid@gmail.com> Date: Tue, 26 Mar 2013 17:07:20 -0400 Subject: [ticket/11448] Use of $user_id parameter to mark a user's notifications read Currently, the $user_id is a parameter but is not used. This patch fixes that. PHPBB3-11448 --- phpBB/includes/notification/manager.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/includes') diff --git a/phpBB/includes/notification/manager.php b/phpBB/includes/notification/manager.php index ff83d4bb37..4e26234390 100644 --- a/phpBB/includes/notification/manager.php +++ b/phpBB/includes/notification/manager.php @@ -256,6 +256,7 @@ class phpbb_notification_manager SET notification_read = 1 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) . "'") : '') . + (($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_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); } -- cgit v1.2.1 From c629b2c7b3bd8bcb836ed8d0b4e583170ede2558 Mon Sep 17 00:00:00 2001 From: Joas Schilling <nickvergessen@gmx.de> Date: Wed, 27 Mar 2013 15:01:36 +0100 Subject: [ticket/11476] Remove pass-by-reference from sql_mutli_insert The method never writes to the array passed by reference. So it can be passed by value instead to avoid certain problems. PHPBB3-11476 --- phpBB/includes/db/driver/driver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes') diff --git a/phpBB/includes/db/driver/driver.php b/phpBB/includes/db/driver/driver.php index 8dda94bc2c..b915ee081b 100644 --- a/phpBB/includes/db/driver/driver.php +++ b/phpBB/includes/db/driver/driver.php @@ -568,12 +568,12 @@ class phpbb_db_driver * Run more than one insert statement. * * @param string $table table name to run the statements on - * @param array &$sql_ary multi-dimensional array holding the statement data. + * @param array $sql_ary multi-dimensional array holding the statement data. * * @return bool false if no statements were executed. * @access public */ - function sql_multi_insert($table, &$sql_ary) + function sql_multi_insert($table, $sql_ary) { if (!sizeof($sql_ary)) { -- cgit v1.2.1