From f6c34240395bd53e160bdc8bac10e504451553b8 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Mon, 22 Jul 2019 21:28:03 +0200 Subject: Fix tracking of auto disabled apps in Updater Signed-off-by: Georg Ehrke --- lib/private/Updater.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/private/Updater.php') diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 56bea90ddd7..87e68b84cf4 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -74,6 +74,13 @@ class Updater extends BasicEmitter { 4 => 'Fatal', ]; + /** + * List of appIds that have automatically been disabled during upgrade + * + * @var String[] + */ + private $autoDisabledApps = []; + /** * @param IConfig $config * @param Checker $checker @@ -256,7 +263,8 @@ class Updater extends BasicEmitter { // upgrade appstore apps $this->upgradeAppStoreApps(\OC::$server->getAppManager()->getInstalledApps()); - $this->upgradeAppStoreApps(\OC_App::$autoDisabledApps, true); + $autoDisabledApps = array_merge(\OC_App::$autoDisabledApps, $this->autoDisabledApps); + $this->upgradeAppStoreApps($autoDisabledApps, true); // install new shipped apps on upgrade OC_App::loadApps(['authentication']); @@ -405,6 +413,7 @@ class Updater extends BasicEmitter { throw new \UnexpectedValueException('The files of the app "' . $app . '" were not correctly replaced before running the update'); } \OC::$server->getAppManager()->disableApp($app); + $this->autoDisabledApps[] = $app; $this->emit('\OC\Updater', 'incompatibleAppDisabled', array($app)); } // no need to disable any app in case this is a non-core upgrade -- cgit v1.2.3