// Perfs improved
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16629 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+6
-1
@@ -59,7 +59,12 @@ function ddd($var)
|
||||
*/
|
||||
function pSQL($string, $htmlOK = false)
|
||||
{
|
||||
return Db::getInstance()->escape($string, $htmlOK);
|
||||
// Avoid thousands of "Db::getInstance()"...
|
||||
static $db = false;
|
||||
if (!$db)
|
||||
$db = Db::getInstance();
|
||||
|
||||
return $db->escape($string, $htmlOK);
|
||||
}
|
||||
|
||||
function bqSQL($string)
|
||||
|
||||
Reference in New Issue
Block a user