Browse Source

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

remotes/origin/stable4
Arthur Schiwon 14 years ago
parent
commit
773f3cf973
  1. 15
      lib/app.php

15
lib/app.php

@ -27,7 +27,6 @@
* upgrading and removing apps.
*/
class OC_App{
static private $init = false;
static private $apps = array();
static private $activeapp = '';
static private $navigation = array();
@ -36,6 +35,7 @@ class OC_App{
static private $personalForms = array();
static private $appInfo = array();
static private $appTypes = array();
static private $loadedApps = array();
/**
* @brief loads all apps
@ -49,15 +49,11 @@ class OC_App{
* if $types is set, only apps of those types will be loaded
*/
public static function loadApps($types=null){
// Did we already load everything?
if( self::$init ){
return true;
}
// Our very own core apps are hardcoded
foreach( array( 'settings') as $app ){
if(is_null($types)){
if(is_null($types) && !in_array($app, self::$loadedApps)){
require( $app.'/appinfo/app.php' );
self::$loadedApps[] = $app;
}
}
@ -66,14 +62,13 @@ class OC_App{
// prevent app.php from printing output
ob_start();
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::$loadedApps[] = $app;
}
}
ob_end_clean();
self::$init = true;
// return
return true;
}

Loading…
Cancel
Save