MDL-31832 CLI upgrade checks if the upgrade is actually needed

Conflicts:

	admin/cli/upgrade.php
This commit is contained in:
David Mudrak
2012-03-07 11:22:38 +01:00
committed by Eloy Lafuente (stronk7)
parent b23ffc0937
commit 01af07849e
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -93,6 +93,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
if (!check_moodle_environment(normalize_version($release), $environment_results, false, ENV_SELECT_RELEASE)) {
$errors = environment_get_errors($environment_results);
+1
View File
@@ -114,6 +114,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';