diff options
Diffstat (limited to 'lib/app.php')
-rw-r--r-- | lib/app.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/app.php b/lib/app.php index bc4f9c87e96..04fa0ff495d 100644 --- a/lib/app.php +++ b/lib/app.php @@ -65,9 +65,7 @@ class OC_App{ $apps = self::getEnabledApps(); foreach( $apps as $app ){ if((is_null($types) or self::isType($app,$types))){ - if(is_file(OC::$APPSROOT.'/apps/'.$app.'/appinfo/app.php')){ - require( $app.'/appinfo/app.php' ); - } + self::loadApp($app); } } @@ -78,6 +76,16 @@ class OC_App{ } /** + * load a single app + * @param string app + */ + public static function loadApp($app){ + if(is_file(OC::$APPSROOT.'/apps/'.$app.'/appinfo/app.php')){ + require_once( $app.'/appinfo/app.php' ); + } + } + + /** * check if an app is of a sepcific type * @param string $app * @param string/array $types @@ -115,7 +123,7 @@ class OC_App{ self::$appTypes[$app]=''; } - OC_Appconfig::setValue($app,'types',implode(',',self::$appTypes[$app])); + OC_Appconfig::setValue($app,'types',self::$appTypes[$app]); } return explode(',',self::$appTypes[$app]); |