From b8a597e2190d91eb75eaca0270846282f77dfed9 Mon Sep 17 00:00:00 2001 From: flyskyko Date: Tue, 6 Sep 2011 07:00:50 +0000 Subject: [PATCH] fixed wrong path when XE is installed in web root git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9050 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/frontendfile/FrontEndFileHandler.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/classes/frontendfile/FrontEndFileHandler.class.php b/classes/frontendfile/FrontEndFileHandler.class.php index d3470b838..434c4d372 100644 --- a/classes/frontendfile/FrontEndFileHandler.class.php +++ b/classes/frontendfile/FrontEndFileHandler.class.php @@ -221,7 +221,14 @@ if(strpos($path, './') === 0) { - $path = dirname($_SERVER['SCRIPT_NAME']) . '/' . substr($path, 2); + if (dirname($_SERVER['SCRIPT_NAME']) == '/') + { + $path = '/' . substr($path, 2); + } + else + { + $path = dirname($_SERVER['SCRIPT_NAME']) . '/' . substr($path, 2); + } } else if(strpos($file, '../') === 0) {