aboutsummaryrefslogtreecommitdiffstats
path: root/core/ajax/update.php
diff options
context:
space:
mode:
authorMichaIng <micha@dietpi.com>2021-11-30 16:45:51 +0100
committerMichaIng <micha@dietpi.com>2024-02-27 20:19:56 +0100
commit7b137ddd754f7dab5fcb8e0c34acb9b6d19b9a00 (patch)
treed15e01e25317b1119938516a5853ad6d9ca3a75a /core/ajax/update.php
parent455a209b9c4f3b95a016ce1c0bcd1bcfa3fc86bf (diff)
downloadnextcloud-server-7b137ddd754f7dab5fcb8e0c34acb9b6d19b9a00.tar.gz
nextcloud-server-7b137ddd754f7dab5fcb8e0c34acb9b6d19b9a00.zip
feat(updater): hide overwrites from disabled apps list on upgrade
If an incompatible app is enabled manually, it is added to the "app_install_overwrite" array in config.php. Nextcloud upgrades won't disable any app in this array, but they were still shown on the upgrade page and logs as being disabled. This commit assures that only apps which are really disabled, i.e. which are not in the "app_install_overwrite" array, are shown and logged as disabled during upgrades. Signed-off-by: MichaIng <micha@dietpi.com>
Diffstat (limited to 'core/ajax/update.php')
-rw-r--r--core/ajax/update.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 63d1bd3cf5e..ed5fe00e147 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -120,6 +120,7 @@ if (\OCP\Util::needUpgrade()) {
\OC::$server->query(\OC\Installer::class)
);
$incompatibleApps = [];
+ $incompatibleOverwrites = $config->getSystemValue('app_install_overwrite', []);
/** @var IEventDispatcher $dispatcher */
$dispatcher = \OC::$server->get(IEventDispatcher::class);
@@ -162,8 +163,10 @@ if (\OCP\Util::needUpgrade()) {
$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($eventSource, $l) {
$eventSource->send('success', $l->t('Updated "%1$s" to %2$s', [$app, $version]));
});
- $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) {
- $incompatibleApps[] = $app;
+ $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps, &$incompatibleOverwrites) {
+ if (!in_array($app, $incompatibleOverwrites)) {
+ $incompatibleApps[] = $app;
+ }
});
$updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource, $config) {
$eventSource->send('failure', $message);