From e0c900f0a72d4ffd9dac46465946471b100e798b Mon Sep 17 00:00:00 2001 From: rMalie Date: Thu, 22 Dec 2011 19:18:08 +0000 Subject: [PATCH] // htaccess is not generated during install --- classes/Tools.php | 5 ++++- install-new/init.php | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/Tools.php b/classes/Tools.php index b9d422d61..a2ed48d37 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -1302,7 +1302,7 @@ class ToolsCore public static function simplexml_load_file($url, $class_name = null) { if (in_array(ini_get('allow_url_fopen'), array('On', 'on', '1'))) - return simplexml_load_string(Tools::file_get_contents($url), $class_name); + return @simplexml_load_string(Tools::file_get_contents($url), $class_name); else return false; } @@ -1495,6 +1495,9 @@ class ToolsCore public static function generateHtaccess($path, $rewrite_settings, $cache_control, $specific = '', $disable_multiviews = false) { + if (defined('PS_INSTALLATION_IN_PROGRESS')) + return; + // Check current content of .htaccess and save all code outside of prestashop comments $specific_before = $specific_after = ''; if (file_exists($path)) diff --git a/install-new/init.php b/install-new/init.php index 58ee71ed0..6dd68d42f 100644 --- a/install-new/init.php +++ b/install-new/init.php @@ -28,6 +28,7 @@ define('_PS_INSTALL_VERSION_', '1.5.0.0'); // Generate common constants +define('PS_INSTALLATION_IN_PROGRESS', true); define('_PS_INSTALL_PATH_', dirname(__FILE__).'/'); define('_PS_INSTALL_DATA_PATH_', _PS_INSTALL_PATH_.'data/'); define('_PS_INSTALL_CONTROLLERS_PATH_', _PS_INSTALL_PATH_.'controllers/');