Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-16 22:50:52 +0400
committerBart Visscher <bartv@thisnet.nl>2012-06-21 22:13:30 +0400
commit8aa7ed39a55e71cf6c054d40235a2dee99ca1b8a (patch)
tree8b0ed357f7dae662fa94f903ec58e8c3b62570ca
parent46ad51cbe2501ef37603b186ae07886a5186c342 (diff)
Only check for apps owncloud version requirment when there is a new owncloud version
-rw-r--r--lib/app.php29
-rw-r--r--lib/base.php1
2 files changed, 16 insertions, 14 deletions
diff --git a/lib/app.php b/lib/app.php
index 52a1587ae39..e57e1e58a28 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -514,32 +514,33 @@ class OC_App{
$currentVersion=OC_App::getAppVersion($app);
if ($currentVersion) {
if (version_compare($currentVersion, $installedVersion, '>')) {
- OC_Log::write($app,'starting app upgrade from '.$installedVersion.' to '.$currentVersion,OC_Log::DEBUG);
+ OC_Log::write($app, 'starting app upgrade from '.$installedVersion.' to '.$currentVersion,OC_Log::DEBUG);
OC_App::updateApp($app);
- OC_Appconfig::setValue($app,'installed_version',OC_App::getAppVersion($app));
+ OC_Appconfig::setValue($app, 'installed_version', OC_App::getAppVersion($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();
+ /**
+ * 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.
+ */
+ public static function checkAppsRequirements($apps = array()){
+ if (empty($apps)) {
+ $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);
+ $info = OC_App::getAppInfo($app);
if(!isset($info['require']) or ($version[0]>$info['require'])){
OC_Log::write('core','App "'.$info['name'].'" can\'t be used because it is not compatible with this version of ownCloud',OC_Log::ERROR);
OC_App::disable( $app );
}
-
-
-
}
-
-
-
}
/**
diff --git a/lib/base.php b/lib/base.php
index 71e2ed63888..0e7e370cd6d 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -237,6 +237,7 @@ class OC{
}
OC_Config::setValue('version',implode('.',OC_Util::getVersion()));
+ OC_App::checkAppsRequirements();
}
OC_App::updateApps();