From aae3ea56a1f886e34fb96513aa7f381797402d34 Mon Sep 17 00:00:00 2001 From: rMalie Date: Tue, 25 Oct 2011 20:31:23 +0000 Subject: [PATCH] // Fix bug on install --- classes/ConfigurationTest.php | 6 ++++-- install-dev/model.php | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/ConfigurationTest.php b/classes/ConfigurationTest.php index 3c74ba469..abeff76e8 100644 --- a/classes/ConfigurationTest.php +++ b/classes/ConfigurationTest.php @@ -161,7 +161,8 @@ class ConfigurationTestCore public static function test_dir($relative_dir, $recursive = false) { - $dir = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.ltrim($relative_dir, '/'); + $root_dir = dirname(dirname(__FILE__)); // @TODO FIXME + $dir = $root_dir.DIRECTORY_SEPARATOR.ltrim($relative_dir, '/'); if (!file_exists($dir) OR !$dh = opendir($dir)) return false; $dummy = rtrim($dir, '/').'/'.uniqid(); @@ -186,7 +187,8 @@ class ConfigurationTestCore public static function test_file($file_relative) { - $file = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$file_relative; + $root_dir = dirname(dirname(__FILE__)); // @TODO FIXME + $file = $root_dir.DIRECTORY_SEPARATOR.$file_relative; return (file_exists($file) AND is_writable($file)); } diff --git a/install-dev/model.php b/install-dev/model.php index f95eafba0..588c82693 100644 --- a/install-dev/model.php +++ b/install-dev/model.php @@ -74,7 +74,6 @@ define('INSTALLER__PS_BASE_URI_ABSOLUTE', 'http://'.ToolsInstall::getHttpHost(fa // XML Header header('Content-Type: text/xml'); -define('_PS_ROOT_DIR_', realpath(INSTALL_PATH.'/../')); // Switching method if (isset($_GET['method'])) {