diff options
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); |