diff options
author | Bart Visscher <bart@thisnet.nl> | 2011-09-18 19:37:54 +0200 |
---|---|---|
committer | Bart Visscher <bart@thisnet.nl> | 2011-09-18 19:37:54 +0200 |
commit | 82c7598861db175617694891bb9f21b426426225 (patch) | |
tree | fce8fb4717b4cc2a5dc6da8835bdb51b5fb40054 /lib/app.php | |
parent | d5656716f69caa6a1eb98706994ffcb9a08553a7 (diff) | |
download | nextcloud-server-82c7598861db175617694891bb9f21b426426225.tar.gz nextcloud-server-82c7598861db175617694891bb9f21b426426225.zip |
Remove global vars and use the OC static version.
Removed global vars are DOCUMENTROOT, SERVERROOT, SUBURI, WEBROOT and CONFIG_DATADIRECTORY
Diffstat (limited to 'lib/app.php')
-rw-r--r-- | lib/app.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/app.php b/lib/app.php index 61ea081c6ff..cd4a7293e49 100644 --- a/lib/app.php +++ b/lib/app.php @@ -44,8 +44,6 @@ class OC_App{ * exists. */ public static function loadApps(){ - global $SERVERROOT; - // Did we allready load everything? if( self::$init ){ return true; @@ -60,7 +58,7 @@ class OC_App{ $apps = OC_Appconfig::getApps(); foreach( $apps as $app ){ if( self::isEnabled( $app )){ - if(is_file($SERVERROOT.'/apps/'.$app.'/appinfo/app.php')){ + if(is_file(OC::$SERVERROOT.'/apps/'.$app.'/appinfo/app.php')){ require( 'apps/'.$app.'/appinfo/app.php' ); } } @@ -285,8 +283,7 @@ class OC_App{ * @return string */ public static function getCurrentApp(){ - global $WEBROOT; - $script=substr($_SERVER["SCRIPT_NAME"],strlen($WEBROOT)+1); + $script=substr($_SERVER["SCRIPT_NAME"],strlen(OC::$WEBROOT)+1); $topFolder=substr($script,0,strpos($script,'/')); if($topFolder=='apps'){ $length=strlen($topFolder); |