From fe40277ec2321692865041117e90bea558f83c15 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 28 Sep 2012 15:29:41 +0200 Subject: [PATCH] Use __DIR__ instead of __FILE__ to get SERVERROOT --- lib/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base.php b/lib/base.php index 21b7165e5e..50f113543c 100644 --- a/lib/base.php +++ b/lib/base.php @@ -104,7 +104,7 @@ class OC{ public static function initPaths() { // calculate the root directories - OC::$SERVERROOT=str_replace("\\", '/', substr(__FILE__, 0, -13)); + OC::$SERVERROOT=str_replace("\\", '/', substr(__DIR__, 0, -4)); OC::$SUBURI= str_replace("\\", "/", substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen(OC::$SERVERROOT))); $scriptName=$_SERVER["SCRIPT_NAME"]; if(substr($scriptName, -1)=='/') {