From 09e5df37042bddb91bf38fa0c9f725572c267f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Thu, 21 Mar 2013 11:17:24 +0100 Subject: [PATCH] // switch to degraded mode with safe_mode only if errors on a first install --- install-dev/controllers/http/process.php | 2 ++ install-dev/models/install.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/install-dev/controllers/http/process.php b/install-dev/controllers/http/process.php index 1051412a1..ff63be1f0 100644 --- a/install-dev/controllers/http/process.php +++ b/install-dev/controllers/http/process.php @@ -109,6 +109,8 @@ class InstallControllerHttpProcess extends InstallControllerHttp { $this->session->process_validated = array(); $this->session->database_clear = true; + if (Tools::getSafeModeStatus()) + $this->session->safe_mode = true; } elseif (!Tools::getValue('submitNext')) { diff --git a/install-dev/models/install.php b/install-dev/models/install.php index 8a0c8e966..cac0d0f80 100644 --- a/install-dev/models/install.php +++ b/install-dev/models/install.php @@ -393,7 +393,7 @@ class InstallModelInstall extends InstallAbstractModel Configuration::loadConfiguration(); // 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); $id_country = Country::getByIso($data['shop_country']); @@ -606,7 +606,7 @@ class InstallModelInstall extends InstallAbstractModel */ public function installModules($module = null) { - if (Tools::getSafeModeStatus()) + if (InstallSession::getInstance()->safe_mode) return true; $modules = $module ? array($module) : $this->getModulesList();