瀏覽代碼

allow to specify upgrade.cli-upgrade-link in order to link to the correct documentation

Signed-off-by: Simon L <szaimen@e.mail.de>
tags/v27.0.1rc1
Simon L 1 年之前
父節點
當前提交
c5b43a4302
共有 4 個檔案被更改,包括 15 行新增4 行删除
  1. 5
    0
      config/config.sample.php
  2. 1
    1
      core/ajax/update.php
  3. 7
    3
      core/templates/update.use-cli.php
  4. 2
    0
      lib/base.php

+ 5
- 0
config/config.sample.php 查看文件

@@ -2149,6 +2149,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
*

+ 1
- 1
core/ajax/update.php 查看文件

@@ -100,7 +100,7 @@ class FeedBackHandler {
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();
}

+ 7
- 3
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>


+ 2
- 0
lib/base.php 查看文件

@@ -312,6 +312,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) {
@@ -358,6 +359,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();

Loading…
取消
儲存