From ab96fa67c886d8ba2a4e930930f8e7a7b95e9cfa Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sun, 26 Feb 2012 18:26:41 +0100 Subject: first part of the abstraction work of the apps folder. more to come --- lib/app.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/app.php') diff --git a/lib/app.php b/lib/app.php index 1879a89cee3..696b35485bd 100644 --- a/lib/app.php +++ b/lib/app.php @@ -58,8 +58,8 @@ class OC_App{ $apps = OC_Appconfig::getApps(); foreach( $apps as $app ){ if( self::isEnabled( $app )){ - if(is_file(OC::$SERVERROOT.'/apps/'.$app.'/appinfo/app.php')){ - require( 'apps/'.$app.'/appinfo/app.php' ); + if(is_file(OC::$APPSROOT.'/apps/'.$app.'/appinfo/app.php')){ + require( $app.'/appinfo/app.php' ); } } } @@ -268,7 +268,7 @@ class OC_App{ if(is_file($appid)){ $file=$appid; }else{ - $file=OC::$SERVERROOT.'/apps/'.$appid.'/appinfo/info.xml'; + $file=OC::$APPSROOT.'/apps/'.$appid.'/appinfo/info.xml'; if(!is_file($file)){ return array(); } @@ -363,9 +363,9 @@ class OC_App{ */ public static function getAllApps(){ $apps=array(); - $dh=opendir(OC::$SERVERROOT.'/apps'); + $dh=opendir(OC::$APPSROOT.'/apps'); while($file=readdir($dh)){ - if(is_file(OC::$SERVERROOT.'/apps/'.$file.'/appinfo/app.php')){ + if(is_file(OC::$APPSROOT.'/apps/'.$file.'/appinfo/app.php')){ $apps[]=$file; } } @@ -396,11 +396,11 @@ class OC_App{ * @param string appid */ public static function updateApp($appid){ - if(file_exists(OC::$SERVERROOT.'/apps/'.$appid.'/appinfo/database.xml')){ - OC_DB::updateDbFromStructure(OC::$SERVERROOT.'/apps/'.$appid.'/appinfo/database.xml'); + if(file_exists(OC::$APPSROOT.'/apps/'.$appid.'/appinfo/database.xml')){ + OC_DB::updateDbFromStructure(OC::$APPSROOT.'/apps/'.$appid.'/appinfo/database.xml'); } - if(file_exists(OC::$SERVERROOT.'/apps/'.$appid.'/appinfo/update.php')){ - include OC::$SERVERROOT.'/apps/'.$appid.'/appinfo/update.php'; + if(file_exists(OC::$APPSROOT.'/apps/'.$appid.'/appinfo/update.php')){ + include OC::$APPSROOT.'/apps/'.$appid.'/appinfo/update.php'; } } -- cgit v1.2.3