// Add temporary theme installation in new installer

This commit is contained in:
rMalie
2011-12-22 14:31:57 +00:00
parent 28a43c2e77
commit 4616b462b2
5 changed files with 252 additions and 2 deletions
+22 -1
View File
@@ -147,7 +147,6 @@ class InstallModelInstall extends InstallAbstractModel
{
if ($clear_database)
$this->clearDatabase(true);
$this->clearDatabase(true);
// Install first shop
if (!$this->createShop())
@@ -550,6 +549,7 @@ class InstallModelInstall extends InstallAbstractModel
*/
public function installFixtures()
{
// @todo REMOVE THIS
Db::getInstance()->delete('prefix_manufacturer');
Db::getInstance()->delete('prefix_manufacturer_lang');
Db::getInstance()->delete('prefix_supplier');
@@ -640,4 +640,25 @@ class InstallModelInstall extends InstallAbstractModel
return true;
}
/**
* PROCESS : installTheme
* Install theme
*/
public function installTheme()
{
// @todo do a real install of the theme
$sql_loader = new InstallSqlLoader();
$sql_loader->setMetaData(array(
'PREFIX_' => _DB_PREFIX_,
'ENGINE_TYPE' => _MYSQL_ENGINE_,
));
$sql_loader->parse_file(_PS_INSTALL_DATA_PATH_.'theme.sql', false);
if ($errors = $sql_loader->getErrors())
{
$this->setError($errors);
return false;
}
}
}