diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php
index c74b8d270493f..45427f6552f7f 100644
--- a/core/Command/Upgrade.php
+++ b/core/Command/Upgrade.php
@@ -88,6 +88,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$self = $this;
$updater = \OCP\Server::get(Updater::class);
+ $incompatibleOverwrites = $this->config->getSystemValue('app_install_overwrite', []);
/** @var IEventDispatcher $dispatcher */
$dispatcher = \OC::$server->get(IEventDispatcher::class);
@@ -179,8 +180,10 @@ function ($success) use ($output, $self) {
$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($output) {
$output->writeln('Updated database');
});
- $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use ($output) {
- $output->writeln('Disabled incompatible app: ' . $app . '');
+ $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use ($output, &$incompatibleOverwrites) {
+ if (!in_array($app, $incompatibleOverwrites)) {
+ $output->writeln('Disabled incompatible app: ' . $app . '');
+ }
});
$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($output) {
$output->writeln('Update app ' . $app . ' from App Store');
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 63d1bd3cf5e63..ed5fe00e1473f 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -120,6 +120,7 @@ public function handleRepairFeedback(Event $event): void {
\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 @@ function (MigratorExecuteSqlEvent $event) use ($eventSource, $l): void {
$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);
diff --git a/lib/base.php b/lib/base.php
index e4fdb8efb4468..72afa0753bab2 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -35,6 +35,7 @@
* @author Lukas Reschke
* @author MartB
* @author Michael Gapczynski
+ * @author MichaIng
* @author Morris Jobke
* @author Owen Winkler
* @author Phil Davis
@@ -388,11 +389,16 @@ private static function printUpgradePage(\OC\SystemConfig $systemConfig): void {
$ocVersion = \OCP\Util::getVersion();
$ocVersion = implode('.', $ocVersion);
$incompatibleApps = $appManager->getIncompatibleApps($ocVersion);
+ $incompatibleOverwrites = $systemConfig->getValue('app_install_overwrite', []);
$incompatibleShippedApps = [];
+ $incompatibleDisabledApps = [];
foreach ($incompatibleApps as $appInfo) {
if ($appManager->isShipped($appInfo['id'])) {
$incompatibleShippedApps[] = $appInfo['name'] . ' (' . $appInfo['id'] . ')';
}
+ if (!in_array($appInfo['id'], $incompatibleOverwrites)) {
+ $incompatibleDisabledApps[] = $appInfo;
+ }
}
if (!empty($incompatibleShippedApps)) {
@@ -402,7 +408,7 @@ private static function printUpgradePage(\OC\SystemConfig $systemConfig): void {
}
$tmpl->assign('appsToUpgrade', $appManager->getAppsNeedingUpgrade($ocVersion));
- $tmpl->assign('incompatibleAppsList', $incompatibleApps);
+ $tmpl->assign('incompatibleAppsList', $incompatibleDisabledApps);
try {
$defaults = new \OC_Defaults();
$tmpl->assign('productName', $defaults->getName());