From 810ee7d811c4cf0291add770cb89e5b6d11104b9 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 23 Jul 2019 10:28:47 +0200 Subject: Make the auto-disabled list more broad Signed-off-by: Joas Schilling --- lib/private/Updater.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lib/private/Updater.php') diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 87e68b84cf4..d5de1bf6b27 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -74,13 +74,6 @@ 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 @@ -263,7 +256,7 @@ class Updater extends BasicEmitter { // upgrade appstore apps $this->upgradeAppStoreApps(\OC::$server->getAppManager()->getInstalledApps()); - $autoDisabledApps = array_merge(\OC_App::$autoDisabledApps, $this->autoDisabledApps); + $autoDisabledApps = \OC::$server->getAppManager()->getAutoDisabledApps(); $this->upgradeAppStoreApps($autoDisabledApps, true); // install new shipped apps on upgrade @@ -412,8 +405,7 @@ class Updater extends BasicEmitter { if ($appManager->isShipped($app)) { 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; + \OC::$server->getAppManager()->disableApp($app, true); $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