// Fix install when _DB_PREFIX_ is empty
This commit is contained in:
@@ -683,7 +683,7 @@ class InstallXmlLoader
|
|||||||
if (!isset($columns[$table]))
|
if (!isset($columns[$table]))
|
||||||
{
|
{
|
||||||
$columns[$table] = array();
|
$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)
|
foreach (Db::getInstance()->executeS($sql) as $row)
|
||||||
$columns[$table][$row['Field']] = $this->checkIfTypeIsText($row['Type']);
|
$columns[$table][$row['Field']] = $this->checkIfTypeIsText($row['Type']);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,8 +131,8 @@ class InstallModelInstall extends InstallAbstractModel
|
|||||||
foreach (Db::getInstance()->executeS('SHOW TABLES') as $row)
|
foreach (Db::getInstance()->executeS('SHOW TABLES') as $row)
|
||||||
{
|
{
|
||||||
$table = current($row);
|
$table = current($row);
|
||||||
if (preg_match('#^'._DB_PREFIX_.'#i', $table))
|
if (!_DB_PREFIX_ || preg_match('#^'._DB_PREFIX_.'#i', $table))
|
||||||
Db::getInstance()->execute((($truncate) ? 'TRUNCATE' : 'DROP TABLE').' '.$table);
|
Db::getInstance()->execute((($truncate) ? 'TRUNCATE' : 'DROP TABLE').' `'.$table.'`');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user