Skip to content
Snippets Groups Projects
Commit b0d83d6d authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

make it possible to load apps seperately. needed to fix oc-910 without breaking oc-863

parent cf85a1e2
Branches
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ class OC_App{ ...@@ -35,6 +35,7 @@ class OC_App{
static private $personalForms = array(); static private $personalForms = array();
static private $appInfo = array(); static private $appInfo = array();
static private $appTypes = array(); static private $appTypes = array();
static private $loadedApps = array();
/** /**
* @brief loads all apps * @brief loads all apps
...@@ -48,24 +49,18 @@ class OC_App{ ...@@ -48,24 +49,18 @@ class OC_App{
* if $types is set, only apps of those types will be loaded * if $types is set, only apps of those types will be loaded
*/ */
public static function loadApps($types=null){ public static function loadApps($types=null){
// Did we already load everything?
if( self::$init ){
return true;
}
// Load the enabled apps here // Load the enabled apps here
$apps = self::getEnabledApps(); $apps = self::getEnabledApps();
// prevent app.php from printing output // prevent app.php from printing output
ob_start(); ob_start();
foreach( $apps as $app ){ foreach( $apps as $app ){
if((is_null($types) or self::isType($app,$types))){ if((is_null($types) or self::isType($app,$types)) && !in_array($app, self::$loadedApps)){
self::loadApp($app); self::loadApp($app);
self::$loadedApps[] = $app;
} }
} }
ob_end_clean(); ob_end_clean();
self::$init = true;
// return // return
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment