// Fix installer when safe_mode is enabled
This commit is contained in:
@@ -1956,6 +1956,13 @@ exit;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getSafeModeStatus()
|
||||||
|
{
|
||||||
|
if (!$safe_mode = @ini_get('safe_mode'))
|
||||||
|
$safe_mode = '';
|
||||||
|
return in_array(Tools::strtolower($safe_mode), array(1, 'on'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @desc extract a zip file to the given directory
|
* @desc extract a zip file to the given directory
|
||||||
* @return bool success
|
* @return bool success
|
||||||
|
|||||||
@@ -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 (@ini_get('safe_mode') == 1)
|
if (Tools::getSafeModeStatus())
|
||||||
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,6 +606,9 @@ class InstallModelInstall extends InstallAbstractModel
|
|||||||
*/
|
*/
|
||||||
public function installModules($module = null)
|
public function installModules($module = null)
|
||||||
{
|
{
|
||||||
|
if (Tools::getSafeModeStatus())
|
||||||
|
return true;
|
||||||
|
|
||||||
$modules = $module ? array($module) : $this->getModulesList();
|
$modules = $module ? array($module) : $this->getModulesList();
|
||||||
$addons_modules = $this->getAddonsModulesList();
|
$addons_modules = $this->getAddonsModulesList();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user