// switch to degraded mode with safe_mode only if errors on a first install

This commit is contained in:
Rémi Gaillard committed 2013-03-21 11:17:24 +01:00
1 parent 1f3f53607d
commit 09e5df3704
2 files changed
+4 -2

No files matched your search

+2
View File
@@ -109,6 +109,8 @@ class InstallControllerHttpProcess extends InstallControllerHttp
{ {
$this->session->process_validated = array(); $this->session->process_validated = array();
$this->session->database_clear = true; $this->session->database_clear = true;
if (Tools::getSafeModeStatus())
$this->session->safe_mode = true;
} }
elseif (!Tools::getValue('submitNext')) elseif (!Tools::getValue('submitNext'))
{ {
+2 -2
View File
@@ -393,7 +393,7 @@ class InstallModelInstall extends InstallAbstractModel
Configuration::loadConfiguration(); Configuration::loadConfiguration();
// use the old image system if the safe_mod is enabled otherwise the installer will fail with the fixtures installation // use the old image system if the safe_mod is enabled otherwise the installer will fail with the fixtures installation
if (Tools::getSafeModeStatus()) if (InstallSession::getInstance()->safe_mode)
Configuration::updateGlobalValue('PS_LEGACY_IMAGES', 1); Configuration::updateGlobalValue('PS_LEGACY_IMAGES', 1);
$id_country = Country::getByIso($data['shop_country']); $id_country = Country::getByIso($data['shop_country']);
@@ -606,7 +606,7 @@ class InstallModelInstall extends InstallAbstractModel
*/ */
public function installModules($module = null) public function installModules($module = null)
{ {
if (Tools::getSafeModeStatus()) if (InstallSession::getInstance()->safe_mode)
return true; return true;
$modules = $module ? array($module) : $this->getModulesList(); $modules = $module ? array($module) : $this->getModulesList();