summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-05-11 21:31:51 +0200
committerBart Visscher <bartv@thisnet.nl>2012-05-11 21:31:51 +0200
commit97233b77cd0cfb7671e8914fd047642988ea425b (patch)
tree0c8a3cefe67648a809b9e3174cad58a96edf6046 /lib/base.php
parent9a66b869c0db189338ccf0333183108bf81a7786 (diff)
downloadnextcloud-server-97233b77cd0cfb7671e8914fd047642988ea425b.tar.gz
nextcloud-server-97233b77cd0cfb7671e8914fd047642988ea425b.zip
Remove DOCUMENTROOT static var, and make SUBURI var private
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/base.php b/lib/base.php
index e7ca51740c6..f01e1f5be6c 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -31,17 +31,13 @@ class OC{
*/
public static $CLASSPATH = array();
/**
- * $_SERVER['DOCUMENTROOT'] but without symlinks
- */
- public static $DOCUMENTROOT = '';
- /**
* The installation path for owncloud on the server (e.g. /srv/http/owncloud)
*/
public static $SERVERROOT = '';
/**
* the current request path relative to the owncloud root (e.g. files/index.php)
*/
- public static $SUBURI = '';
+ private static $SUBURI = '';
/**
* the owncloud root path for http requests (e.g. owncloud/)
*/
@@ -122,7 +118,7 @@ class OC{
public static function initPaths(){
// calculate the documentroot
- OC::$DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']);
+ $DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']);
OC::$SERVERROOT=str_replace("\\",'/',substr(__FILE__,0,-13));
OC::$SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen(OC::$SERVERROOT));
$scriptName=$_SERVER["SCRIPT_NAME"];
@@ -138,7 +134,7 @@ class OC{
}
OC::$WEBROOT=substr($scriptName,0,strlen($scriptName)-strlen(OC::$SUBURI));
// try a new way to detect the WEBROOT which is simpler and also works with the app directory outside the owncloud folder. let´s see if this works for everybody
-// OC::$WEBROOT=substr(OC::$SERVERROOT,strlen(OC::$DOCUMENTROOT));
+// OC::$WEBROOT=substr(OC::$SERVERROOT,strlen($DOCUMENTROOT));
if(OC::$WEBROOT!='' and OC::$WEBROOT[0]!=='/'){