From 7eb945f77133c1914839e39dac308dad400465a1 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Tue, 10 Dec 2013 18:56:54 +0100 Subject: [PATCH] Fix #1621 : User query per last applied template triggers an error --- lib/classes/User/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/User/Query.php b/lib/classes/User/Query.php index ad10d3c752..940ed9deaf 100644 --- a/lib/classes/User/Query.php +++ b/lib/classes/User/Query.php @@ -323,7 +323,7 @@ class User_Query implements User_QueryInterface } if ($this->last_model) { - $sql .= ' AND usr.lastModel = "' . mysql_real_escape_string($this->last_model) . '" '; + $sql .= ' AND usr.lastModel = ' . $this->app['phraseanet.appbox']->get_connection()->quote($this->last_model) . ' '; } $sql_like = array();