mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-31832 CLI upgrade checks if the upgrade is actually needed
This commit is contained in:
parent
a1ef8c6d3c
commit
91c038f932
@ -92,6 +92,10 @@ if ($version < $CFG->version) {
|
||||
$oldversion = "$CFG->release ($CFG->version)";
|
||||
$newversion = "$release ($version)";
|
||||
|
||||
if (!moodle_needs_upgrading()) {
|
||||
cli_error(get_string('cliupgradenoneed', 'core_admin', $newversion), 63);
|
||||
}
|
||||
|
||||
// Test environment first.
|
||||
list($envstatus, $environment_results) = check_moodle_environment(normalize_version($release), ENV_SELECT_RELEASE);
|
||||
if (!$envstatus) {
|
||||
|
@ -106,6 +106,7 @@ $string['cliunknowoption'] = 'Unrecognised options:
|
||||
{$a}
|
||||
Please use --help option.';
|
||||
$string['cliupgradefinished'] = 'Command line upgrade completed successfully.';
|
||||
$string['cliupgradenoneed'] = 'No upgrade needed for the installed version {$a}. Thanks for coming anyway!';
|
||||
$string['cliyesnoprompt'] = 'type y (means yes) or n (means no)';
|
||||
$string['commentsperpage'] = 'Comments displayed per page';
|
||||
$string['commonfiltersettings'] = 'Common filter settings';
|
||||
|
Loading…
x
Reference in New Issue
Block a user