diff --git a/lib/private/updater.php b/lib/private/updater.php index 0853696fe2..5b505d7ded 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -358,6 +358,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) { @@ -367,6 +368,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; @@ -381,5 +386,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; + } }