diff --git a/config/config.sample.php b/config/config.sample.php
index 366b6fbbc7533..94b8a5d055245 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -2154,6 +2154,11 @@
*/
'upgrade.disable-web' => false,
+/**
+ * Allows to modify the cli-upgrade link in order to link to a different documentation
+ */
+'upgrade.cli-upgrade-link' => '',
+
/**
* Set this Nextcloud instance to debugging mode
*
diff --git a/core/ajax/update.php b/core/ajax/update.php
index c28f2cdcd7c91..2348e20528352 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -103,7 +103,7 @@ public function handleRepairFeedback(Event $event): void {
if (\OCP\Util::needUpgrade()) {
$config = \OC::$server->getSystemConfig();
if ($config->getValue('upgrade.disable-web', false)) {
- $eventSource->send('failure', $l->t('Please use the command line updater because updating via the browser is disabled in your config.php.'));
+ $eventSource->send('failure', $l->t('Please use the command line updater because updating via browser is disabled in your config.php.'));
$eventSource->close();
exit();
}
diff --git a/core/templates/update.use-cli.php b/core/templates/update.use-cli.php
index 403de7feadcd3..ae82436d2f181 100644
--- a/core/templates/update.use-cli.php
+++ b/core/templates/update.use-cli.php
@@ -5,10 +5,14 @@
t('Please use the command line updater because you have a big instance with more than 50 users.'));
} else {
- p($l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
+ p($l->t('Please use the command line updater because updating via browser is disabled in your config.php.'));
} ?>
- t('For help, see the documentation.', [link_to_docs('admin-cli-upgrade')])); ?>
+ t('For help, see the documentation.', [$cliUpgradeLink])); ?>
diff --git a/lib/base.php b/lib/base.php
index 83f97963c4d06..09ec5be441b5b 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -312,6 +312,7 @@ public static function checkMaintenanceMode(\OC\SystemConfig $systemConfig): voi
* Prints the upgrade page
*/
private static function printUpgradePage(\OC\SystemConfig $systemConfig): void {
+ $cliUpgradeLink = $systemConfig->getValue('upgrade.cli-upgrade-link', '');
$disableWebUpdater = $systemConfig->getValue('upgrade.disable-web', false);
$tooBig = false;
if (!$disableWebUpdater) {
@@ -358,6 +359,7 @@ private static function printUpgradePage(\OC\SystemConfig $systemConfig): void {
$template->assign('productName', 'nextcloud'); // for now
$template->assign('version', OC_Util::getVersionString());
$template->assign('tooBig', $tooBig);
+ $template->assign('cliUpgradeLink', $cliUpgradeLink);
$template->printPage();
die();