Commit 80cafe29 authored by Thomas Müller's avatar Thomas Müller
Browse files

3rd-party apps are only disabled in case core is upgraded

parent fe7e7677
......@@ -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;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment