[-] MO: fix blocktopmenu install

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9220 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-10-11 11:28:31 +00:00
parent 48d8dc379f
commit ca010e3a20
4 changed files with 22 additions and 17 deletions
+6 -1
View File
@@ -180,7 +180,7 @@ abstract class DbCore
public static function getClass()
{
$class = 'MySQL';
if (class_exists('mysqli', false))
if (0&&class_exists('mysqli', false))
$class = 'DbMySQLi';
return $class;
}
@@ -361,6 +361,11 @@ abstract class DbCore
public function executeS($sql, $array = true, $use_cache = 1)
{
$sql = (string)$sql;
// This methode must be used only with queries which display results
if (!preg_match('#^\s*(select|show|explain)\s#i', $sql))
throw new PrestashopDatabaseException('Db->executeS() must be used only with select, show or explain queries');
$this->result = false;
$this->last_query = $sql;
if ($use_cache && _PS_CACHE_ENABLED_ && $array && ($result = Cache::getInstance()->get(md5($sql))))