summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-09-30 11:49:00 +0200
committerGitHub <noreply@github.com>2021-09-30 11:49:00 +0200
commit3c614aa242e3c356c569888a3fdde7f513b872b2 (patch)
treec72dacb8c7d804c1cf7368d19f03cee660133006 /lib
parentb8641965b7eb7321f6346fea140a011c2f40054b (diff)
parent151271f832b28d1e1c803e2b2bc5f5e9fccf129a (diff)
downloadnextcloud-server-3c614aa242e3c356c569888a3fdde7f513b872b2.tar.gz
nextcloud-server-3c614aa242e3c356c569888a3fdde7f513b872b2.zip
Merge pull request #29005 from nextcloud/bugfix/noid/remove-dead-code
Remove dead code
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Updater.php19
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index cffdac310cb..4ddb5e2b7cb 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -362,14 +362,12 @@ class Updater extends BasicEmitter {
* This is important if you upgrade ownCloud and have non ported 3rd
* party apps installed.
*
- * @return array
* @throws \Exception
*/
- private function checkAppsRequirements(): array {
+ private function checkAppsRequirements(): void {
$isCoreUpgrade = $this->isCodeUpgrade();
$apps = OC_App::getEnabledApps();
$version = implode('.', Util::getVersion());
- $disabledApps = [];
$appManager = \OC::$server->getAppManager();
foreach ($apps as $app) {
// check if the app is compatible with this version of Nextcloud
@@ -378,23 +376,10 @@ 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, true);
+ $appManager->disableApp($app, true);
$this->emit('\OC\Updater', 'incompatibleAppDisabled', [$app]);
}
- // no need to disable any app in case this is a non-core upgrade
- if (!$isCoreUpgrade) {
- continue;
- }
- // shipped apps will remain enabled
- if ($appManager->isShipped($app)) {
- continue;
- }
- // authentication and session apps will remain enabled as well
- if (OC_App::isType($app, ['session', 'authentication'])) {
- continue;
- }
}
- return $disabledApps;
}
/**