diff options
author | Simon L <szaimen@e.mail.de> | 2023-06-12 17:00:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-12 17:00:05 +0200 |
commit | 6cd22c9c62246077935cb32ee8cb91ad0d142f82 (patch) | |
tree | 934f2bef9364116aa22c2b65fbd87e3df3b3b841 | |
parent | 90718647303a0ba40850f2ee499be68b9c856559 (diff) | |
parent | eade01588958010be6806f298ac356a121331965 (diff) | |
download | nextcloud-server-6cd22c9c62246077935cb32ee8cb91ad0d142f82.tar.gz nextcloud-server-6cd22c9c62246077935cb32ee8cb91ad0d142f82.zip |
Merge pull request #38752 from nextcloud/backport/38735/stable26
[stable26] allow to specify upgrade.cli-upgrade-link in order to link to the correct documentation
-rw-r--r-- | config/config.sample.php | 5 | ||||
-rw-r--r-- | core/templates/update.use-cli.php | 10 | ||||
-rw-r--r-- | lib/base.php | 2 |
3 files changed, 14 insertions, 3 deletions
diff --git a/config/config.sample.php b/config/config.sample.php index 892f84601e4..c3a15a8a985 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -2138,6 +2138,11 @@ $CONFIG = [ '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 * * Only enable this for local development and not in production environments diff --git a/core/templates/update.use-cli.php b/core/templates/update.use-cli.php index 403de7feadc..ae82436d2f1 100644 --- a/core/templates/update.use-cli.php +++ b/core/templates/update.use-cli.php @@ -5,10 +5,14 @@ <?php if ($_['tooBig']) { p($l->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.')); } ?><br><br> - <?php - print_unescaped($l->t('For help, see the <a target="_blank" rel="noreferrer noopener" href="%s">documentation</a>.', [link_to_docs('admin-cli-upgrade')])); ?> + <?php if (is_string($_['cliUpgradeLink']) && $_['cliUpgradeLink'] !== '') { + $cliUpgradeLink = $_['cliUpgradeLink']; + } else { + $cliUpgradeLink = link_to_docs('admin-cli-upgrade'); + } + print_unescaped($l->t('For help, see the <a target="_blank" rel="noreferrer noopener" href="%s">documentation</a>.', [$cliUpgradeLink])); ?> </div> </div> diff --git a/lib/base.php b/lib/base.php index 32ac60c8c4f..3cca7ab3a96 100644 --- a/lib/base.php +++ b/lib/base.php @@ -309,6 +309,7 @@ class OC { * 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) { @@ -355,6 +356,7 @@ class OC { $template->assign('productName', 'nextcloud'); // for now $template->assign('version', OC_Util::getVersionString()); $template->assign('tooBig', $tooBig); + $template->assign('cliUpgradeLink', $cliUpgradeLink); $template->printPage(); die(); |