summaryrefslogtreecommitdiffstats
path: root/lib/app.php
diff options
context:
space:
mode:
authorBart Visscher <bart@thisnet.nl>2011-09-18 19:37:54 +0200
committerBart Visscher <bart@thisnet.nl>2011-09-18 19:37:54 +0200
commit82c7598861db175617694891bb9f21b426426225 (patch)
treefce8fb4717b4cc2a5dc6da8835bdb51b5fb40054 /lib/app.php
parentd5656716f69caa6a1eb98706994ffcb9a08553a7 (diff)
downloadnextcloud-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.php7
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);