Skip to content

Commit 8875468

Browse files
committed
Remove unused checkAppUpgrade method
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 0cef07f commit 8875468

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

lib/private/Updater.php

-41
Original file line numberDiff line numberDiff line change
@@ -299,47 +299,6 @@ protected function doCoreUpgrade() {
299299
$this->emit('\OC\Updater', 'dbUpgrade');
300300
}
301301

302-
/**
303-
* @param string $version the oc version to check app compatibility with
304-
*/
305-
protected function checkAppUpgrade($version) {
306-
$apps = \OC_App::getEnabledApps();
307-
$this->emit('\OC\Updater', 'appUpgradeCheckBefore');
308-
309-
$appManager = \OC::$server->getAppManager();
310-
foreach ($apps as $appId) {
311-
$info = \OC_App::getAppInfo($appId);
312-
$compatible = \OC_App::isAppCompatible($version, $info);
313-
$isShipped = $appManager->isShipped($appId);
314-
315-
if ($compatible && $isShipped && \OC_App::shouldUpgrade($appId)) {
316-
/**
317-
* FIXME: The preupdate check is performed before the database migration, otherwise database changes
318-
* are not possible anymore within it. - Consider this when touching the code.
319-
* @link https://github.com/owncloud/core/issues/10980
320-
* @see \OC_App::updateApp
321-
*/
322-
if (file_exists(\OC_App::getAppPath($appId) . '/appinfo/preupdate.php')) {
323-
$this->includePreUpdate($appId);
324-
}
325-
if (file_exists(\OC_App::getAppPath($appId) . '/appinfo/database.xml')) {
326-
$this->emit('\OC\Updater', 'appSimulateUpdate', [$appId]);
327-
\OC_DB::simulateUpdateDbFromStructure(\OC_App::getAppPath($appId) . '/appinfo/database.xml');
328-
}
329-
}
330-
}
331-
332-
$this->emit('\OC\Updater', 'appUpgradeCheck');
333-
}
334-
335-
/**
336-
* Includes the pre-update file. Done here to prevent namespace mixups.
337-
* @param string $appId
338-
*/
339-
private function includePreUpdate($appId) {
340-
include \OC_App::getAppPath($appId) . '/appinfo/preupdate.php';
341-
}
342-
343302
/**
344303
* upgrades all apps within a major ownCloud upgrade. Also loads "priority"
345304
* (types authentication, filesystem, logging, in that order) afterwards.

0 commit comments

Comments
 (0)