summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-09-28 15:29:41 +0200
committerBart Visscher <bartv@thisnet.nl>2012-10-10 21:06:15 +0200
commitfe40277ec2321692865041117e90bea558f83c15 (patch)
treee3a6dab73fcda0694d755d58da240fb6a4f4550b /lib
parentd525654fcd9af0a8887bae510377da71406cc4a9 (diff)
downloadnextcloud-server-fe40277ec2321692865041117e90bea558f83c15.tar.gz
nextcloud-server-fe40277ec2321692865041117e90bea558f83c15.zip
Use __DIR__ instead of __FILE__ to get SERVERROOT
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index 21b7165e5e8..50f113543c4 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)=='/') {