3rd-party apps are only disabled in case core is upgraded
This commit is contained in:
parent
fe7e7677e9
commit
80cafe29a8
|
@ -358,6 +358,7 @@ class Updater extends BasicEmitter {
|
||||||
* party apps installed.
|
* party apps installed.
|
||||||
*/
|
*/
|
||||||
private function checkAppsRequirements() {
|
private function checkAppsRequirements() {
|
||||||
|
$isCoreUpgrade = $this->isCodeUpgrade();
|
||||||
$apps = OC_App::getEnabledApps();
|
$apps = OC_App::getEnabledApps();
|
||||||
$version = OC_Util::getVersion();
|
$version = OC_Util::getVersion();
|
||||||
foreach ($apps as $app) {
|
foreach ($apps as $app) {
|
||||||
|
@ -367,6 +368,10 @@ class Updater extends BasicEmitter {
|
||||||
OC_App::disable($app);
|
OC_App::disable($app);
|
||||||
$this->emit('\OC\Updater', 'incompatibleAppDisabled', array($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
|
// shipped apps will remain enabled
|
||||||
if (OC_App::isShipped($app)) {
|
if (OC_App::isShipped($app)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -381,5 +386,14 @@ class Updater extends BasicEmitter {
|
||||||
$this->emit('\OC\Updater', 'thirdPartyAppDisabled', array($app));
|
$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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue