summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJakob Sack <kde@jakobsack.de>2011-08-02 18:48:19 +0200
committerJakob Sack <kde@jakobsack.de>2011-08-02 18:48:19 +0200
commitdb90b2e44a15e5e9aeb7cffe9138fae37df0c148 (patch)
treebdc9968673baa5af127ebf629109dc52c0152b62 /lib
parentc50a83cd8d9387aa221236aa261ebcc7e71bdd41 (diff)
downloadnextcloud-server-db90b2e44a15e5e9aeb7cffe9138fae37df0c148.tar.gz
nextcloud-server-db90b2e44a15e5e9aeb7cffe9138fae37df0c148.zip
prepare replacing global $vars with OC::$vars
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php27
1 files changed, 25 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index d3097f7ee87..b2c5bd32314 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -28,6 +28,30 @@ class OC{
* Assoziative array for autoloading. classname => filename
*/
public static $CLASSPATH = array();
+ /**
+ * $_SERVER['DOCUMENTROOT'] but without symlinks
+ */
+ public static $DOCUMENTROOT = '';
+ /**
+ * TODO: What's this for?
+ */
+ public static $SERVERROOT = '';
+ /**
+ * TODO: What's this for?
+ */
+ public static $SUBURI = '';
+ /**
+ * TODO: What's this for?
+ */
+ public static $WEBROOT = '';
+ /**
+ * TODO: What's this for?
+ */
+ public static $CONFIG_DATADIRECTORY = '';
+ /**
+ * TODO: What's this for?
+ */
+ public static $CONFIG_DATADIRECTORY_ROOT = '';
}
// Get rid of this stupid require_once OC_...
@@ -52,9 +76,8 @@ ini_set('session.cookie_httponly','1;');
session_start();
// calculate the documentroot
-$SERVERROOT=substr(__FILE__,0,-13);
$DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']);
-$SERVERROOT=str_replace("\\",'/',$SERVERROOT);
+$SERVERROOT=str_replace("\\",'/',substr(__FILE__,0,-13));
$SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen($SERVERROOT));
$scriptName=$_SERVER["SCRIPT_NAME"];
if(substr($scriptName,-1)=='/'){