// Fix install when _DB_PREFIX_ is empty
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13395 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -683,7 +683,7 @@ class InstallXmlLoader
|
||||
if (!isset($columns[$table]))
|
||||
{
|
||||
$columns[$table] = array();
|
||||
$sql = 'SHOW COLUMNS FROM `'.bqSQL(_DB_PREFIX_.$table).'`';
|
||||
$sql = 'SHOW COLUMNS FROM `'._DB_PREFIX_.bqSQL($table).'`';
|
||||
foreach (Db::getInstance()->executeS($sql) as $row)
|
||||
$columns[$table][$row['Field']] = $this->checkIfTypeIsText($row['Type']);
|
||||
}
|
||||
|
||||
@@ -131,8 +131,8 @@ class InstallModelInstall extends InstallAbstractModel
|
||||
foreach (Db::getInstance()->executeS('SHOW TABLES') as $row)
|
||||
{
|
||||
$table = current($row);
|
||||
if (preg_match('#^'._DB_PREFIX_.'#i', $table))
|
||||
Db::getInstance()->execute((($truncate) ? 'TRUNCATE' : 'DROP TABLE').' '.$table);
|
||||
if (!_DB_PREFIX_ || preg_match('#^'._DB_PREFIX_.'#i', $table))
|
||||
Db::getInstance()->execute((($truncate) ? 'TRUNCATE' : 'DROP TABLE').' `'.$table.'`');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user