// Fix install when _DB_PREFIX_ is empty

This commit is contained in:
rMalie
2012-02-16 14:44:09 +00:00
parent dc1b554aec
commit f30aca6cb4
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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.'`');
}
}