From 2da7fbc0c291d91b01e182d55b55a4fa5f26b544 Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Mon, 28 May 2012 10:59:22 +0200 Subject: [PATCH] MDL-33382 CLI install and upgrade scripts display hint on --allow-unstable in non-interactive mode --- admin/cli/install.php | 3 ++- admin/cli/upgrade.php | 3 ++- lang/en/admin.php | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/admin/cli/install.php b/admin/cli/install.php index dc65e318d14..2cd66f7646e 100644 --- a/admin/cli/install.php +++ b/admin/cli/install.php @@ -425,7 +425,8 @@ if (isset($maturity)) { exit(1); } } else { - cli_error(get_string('maturitycorewarning', 'admin')); + cli_problem(get_string('maturitycorewarning', 'admin', $maturitylevel)); + cli_error(get_string('maturityallowunstable', 'admin')); } } } diff --git a/admin/cli/upgrade.php b/admin/cli/upgrade.php index 33e66cc3a4f..e552d4e1b31 100644 --- a/admin/cli/upgrade.php +++ b/admin/cli/upgrade.php @@ -132,7 +132,8 @@ if (isset($maturity)) { echo get_string('morehelp') . ': ' . get_docs_url('admin/versions') . PHP_EOL; cli_separator(); } else { - cli_error(get_string('maturitycorewarning', 'admin', $maturitylevel)); + cli_problem(get_string('maturitycorewarning', 'admin', $maturitylevel)); + cli_error(get_string('maturityallowunstable', 'admin')); } } } diff --git a/lang/en/admin.php b/lang/en/admin.php index 2ac7b1e2a6b..82581fe53d0 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -636,6 +636,7 @@ $string['maturity50'] = 'Alpha'; $string['maturity100'] = 'Beta'; $string['maturity150'] = 'Release candidate'; $string['maturity200'] = 'Stable version'; +$string['maturityallowunstable'] = 'Hint: You may want to run this script with --allow-unstable option'; $string['maturitycoreinfo'] = 'Your site is currently running unstable "{$a}" development code.'; $string['maturitycorewarning'] = 'The version of Moodle that you are about to install or upgrade to contains unstable "{$a}" development code that is not suitable for use on most production