From 7dd39a91ee30a96f4c7fe3dd0646131191679fbc Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 26 Nov 2020 14:48:41 +0100 Subject: [PATCH] Remove dead method \OC\Updater::checkAppUpgrade Signed-off-by: Christoph Wurst --- lib/private/Updater.php | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 4b5d02aeb6..437ba38362 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -299,47 +299,6 @@ class Updater extends BasicEmitter { $this->emit('\OC\Updater', 'dbUpgrade'); } - /** - * @param string $version the oc version to check app compatibility with - */ - protected function checkAppUpgrade($version) { - $apps = \OC_App::getEnabledApps(); - $this->emit('\OC\Updater', 'appUpgradeCheckBefore'); - - $appManager = \OC::$server->getAppManager(); - foreach ($apps as $appId) { - $info = \OC_App::getAppInfo($appId); - $compatible = \OC_App::isAppCompatible($version, $info); - $isShipped = $appManager->isShipped($appId); - - if ($compatible && $isShipped && \OC_App::shouldUpgrade($appId)) { - /** - * FIXME: The preupdate check is performed before the database migration, otherwise database changes - * are not possible anymore within it. - Consider this when touching the code. - * @link https://github.com/owncloud/core/issues/10980 - * @see \OC_App::updateApp - */ - if (file_exists(\OC_App::getAppPath($appId) . '/appinfo/preupdate.php')) { - $this->includePreUpdate($appId); - } - if (file_exists(\OC_App::getAppPath($appId) . '/appinfo/database.xml')) { - $this->emit('\OC\Updater', 'appSimulateUpdate', [$appId]); - \OC_DB::simulateUpdateDbFromStructure(\OC_App::getAppPath($appId) . '/appinfo/database.xml'); - } - } - } - - $this->emit('\OC\Updater', 'appUpgradeCheck'); - } - - /** - * Includes the pre-update file. Done here to prevent namespace mixups. - * @param string $appId - */ - private function includePreUpdate($appId) { - include \OC_App::getAppPath($appId) . '/appinfo/preupdate.php'; - } - /** * upgrades all apps within a major ownCloud upgrade. Also loads "priority" * (types authentication, filesystem, logging, in that order) afterwards.