Remove dead method \OC\Updater::checkAppUpgrade

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2020-11-26 14:48:41 +01:00
parent 54e3beba16
commit 7dd39a91ee
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
1 changed files with 0 additions and 41 deletions

View File

@ -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.