summaryrefslogtreecommitdiffstats
path: root/lib/app.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-06-04 21:40:18 +0200
committerArthur Schiwon <blizzz@owncloud.com>2012-06-04 21:40:18 +0200
commitb0d83d6d8d123171d97ac48e2fdb16d99093ca57 (patch)
tree681bbd53cbf68c3909f739c247cfce5507b9092a /lib/app.php
parentcf85a1e2649eda241560e0e52cc37580cbca259f (diff)
downloadnextcloud-server-b0d83d6d8d123171d97ac48e2fdb16d99093ca57.tar.gz
nextcloud-server-b0d83d6d8d123171d97ac48e2fdb16d99093ca57.zip
make it possible to load apps seperately. needed to fix oc-910 without breaking oc-863
Diffstat (limited to 'lib/app.php')
-rwxr-xr-xlib/app.php29
1 files changed, 12 insertions, 17 deletions
diff --git a/lib/app.php b/lib/app.php
index 124b76cdc3d..17e0e479031 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -35,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
@@ -48,24 +49,18 @@ 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;
- }
-
// Load the enabled apps here
$apps = self::getEnabledApps();
// 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;
}
@@ -121,7 +116,7 @@ class OC_App{
*/
public static function setAppTypes($app){
$appData=self::getAppInfo($app);
-
+
if(isset($appData['types'])){
$appTypes=implode(',',$appData['types']);
}else{
@@ -183,7 +178,7 @@ class OC_App{
if($app!==false){
// check if the app is compatible with this version of ownCloud
$info=OC_App::getAppInfo($app);
- $version=OC_Util::getVersion();
+ $version=OC_Util::getVersion();
if(!isset($info['require']) or ($version[0]>$info['require'])){
OC_Log::write('core','App "'.$info['name'].'" can\'t be installed because it is not compatible with this version of ownCloud',OC_Log::ERROR);
return false;
@@ -487,13 +482,13 @@ class OC_App{
}
}
}
-
+
// check if the current enabled apps are compatible with the current ownCloud version. disable them if not.
// this is important if you upgrade ownCloud and have non ported 3rd party apps installed
$apps =OC_App::getEnabledApps();
$version=OC_Util::getVersion();
foreach($apps as $app) {
-
+
// check if the app is compatible with this version of ownCloud
$info=OC_App::getAppInfo($app);
if(!isset($info['require']) or ($version[0]>$info['require'])){
@@ -501,12 +496,12 @@ class OC_App{
OC_App::disable( $app );
}
-
-
+
+
}
-
-
-
+
+
+
}
/**
span class='decoration'>John Molakvoæ2023-10-17104-295/+1342 |/ / / / / / / / / / / / / * | | | | | | | | | | | | Merge pull request #40902 from nextcloud/fix/36965-fix-nc-select-on-users-tableJulia Kirschenheuter2023-10-177-10/+17 |\ \ \ \ \ \ \ \ \ \ \ \ \ | * | | | | | | | | | | | | Append to body all selects inside of user tablejulia.kirschenheuter2023-10-177-10/+17 |/ / / / / / / / / / / / / * | | | | | | | | | | | | Fix(l10n): Update translations from TransifexNextcloud bot2023-10-17182-3234/+1438 * | | | | | | | | | | | | Merge pull request #40168 from nextcloud/enh/a11y/user-menuPytal2023-10-165-80/+148 |\ \ \ \ \ \ \ \ \ \ \ \ \ | * | | | | | | | | | | | | chore: compile assetsChristopher Ng2023-10-162-3/+3 | * | | | | | | | | | | | | fix(acceptance): Locate settings menuChristopher Ng2023-10-161-1/+1 | * | | | | | | | | | | | | enh(a11y): Add label to app menu navChristopher Ng2023-10-161-1/+2 | * | | | | | | | | | | | | enh(a11y): Add avatar descriptionChristopher Ng2023-10-161-5/+79 | * | | | | | | | | | | | | enh(a11y): Add accessible user menu semanticsChristopher Ng2023-10-161-71/+64 |/ / / / / / / / / / / / / * | | | | | | | | | | | | Merge pull request #40749 from nextcloud/refactor/contacts-menu-to-vueChristoph Wurst2023-10-1641-1009/+581 |\ \ \ \ \ \ \ \ \ \ \ \ \ | * | | | | | | | | | | | | refactor: Contacts menu to VueChristoph Wurst2023-10-1641-1009/+581 | | |_|_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | * | | | | | | | | | | | | Merge pull request #40934 from nextcloud/techdebt/noid/codeownerJoas Schilling2023-10-161-0/+10 |\ \ \ \ \ \ \ \ \ \ \ \ \ | * | | | | | | | | | | | | chore: Add the talk team as codeowners for things Talk heavily relies onJoas Schilling2023-10-161-0/+10 |/ / / / / / / / / / / / / * | | | | | | | | | | | | Merge pull request #40890 from nextcloud/fix/search/close-unified-search-seco...Christoph Wurst2023-10-163-3/+6 |\ \ \ \ \ \ \ \ \ \ \ \ \ | * | | | | | | | | | | | | fix(search): Close unified search at the second ctrl+fChristoph Wurst2023-10-163-3/+6 | | |_|/ / / / / / / / / / | |/| | | | | | | | | | | * | | | | | | | | | | | | Merge pull request #40931 from nextcloud/bugfix/noid/fix-unit-tests-on-8.3Joas Schilling2023-10-163-3/+6 |\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / |/| | | | | | | | | | | | | * | | | | | | | | | | | Fix unit tests on PHP 8.3Joas Schilling2023-10-163-3/+6 * | | | | | | | | | | | | Merge pull request #40927 from nextcloud/allow-expiry-dates-less-than-enforce...F. E Noel Nfebe2023-10-16