summaryrefslogtreecommitdiffstats
path: root/lib/private/updater.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-02-24 12:51:55 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-02-25 23:07:48 +0100
commit5c7157e0af7644037f697dbb61d1533440a7e5e6 (patch)
treeb1fdd79645c8eab2b3988bc969543481d5f6f798 /lib/private/updater.php
parent1188c74fe5dc20cbbdf5fa2c1c61c242669516aa (diff)
downloadnextcloud-server-5c7157e0af7644037f697dbb61d1533440a7e5e6.tar.gz
nextcloud-server-5c7157e0af7644037f697dbb61d1533440a7e5e6.zip
3rd-party apps are only disabled in case core is upgraded
Diffstat (limited to 'lib/private/updater.php')
-rw-r--r--lib/private/updater.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/private/updater.php b/lib/private/updater.php
index 7d252afac10..485bf7ea48e 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -337,6 +337,7 @@ class Updater extends BasicEmitter {
* party apps installed.
*/
private function checkAppsRequirements() {
+ $isCoreUpgrade = $this->isCodeUpgrade();
$apps = OC_App::getEnabledApps();
$version = OC_Util::getVersion();
foreach ($apps as $app) {
@@ -346,6 +347,10 @@ class Updater extends BasicEmitter {
OC_App::disable($app);
$this->emit('\OC\Updater', 'incompatibleAppDisabled', array($app));
}
+ // no need to disable any app in case this is a non-core upgrade
+ if (!$isCoreUpgrade) {
+ continue;
+ }
// shipped apps will remain enabled
if (OC_App::isShipped($app)) {
continue;
@@ -360,5 +365,14 @@ class Updater extends BasicEmitter {
$this->emit('\OC\Updater', 'thirdPartyAppDisabled', array($app));
}
}
+
+ private function isCodeUpgrade() {
+ $installedVersion = $this->config->getSystemValue('version', '0.0.0');
+ $currentVersion = implode('.', OC_Util::getVersion());
+ if (version_compare($currentVersion, $installedVersion, '>')) {
+ return true;
+ }
+ return false;
+ }
}