Skip to content

Commit

Permalink
MDL-27121 fix incorrect check_moodle_environment() version parameter
Browse files Browse the repository at this point in the history
This prevents Moodle 2.0 from using environment info for 2.1 in the installer and CLI upgrade.
  • Loading branch information
skodak committed Apr 9, 2011
1 parent eb9d692 commit 23580dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion admin/cli/upgrade.php
Expand Up @@ -94,7 +94,7 @@
$newversion = "$release ($version)";

// test environment first
if (!check_moodle_environment($version, $environment_results, false, ENV_SELECT_RELEASE)) {
if (!check_moodle_environment(normalize_version($release), $environment_results, false, ENV_SELECT_RELEASE)) {
$errors = environment_get_errors($environment_results);
cli_heading(get_string('environment', 'admin'));
foreach ($errors as $error) {
Expand Down
2 changes: 1 addition & 1 deletion admin/index.php
Expand Up @@ -152,7 +152,7 @@
echo $OUTPUT->box($releasenoteslink, 'generalbox releasenoteslink');

require_once($CFG->libdir.'/environmentlib.php');
if (!check_moodle_environment($release, $environment_results, true, ENV_SELECT_RELEASE)) {
if (!check_moodle_environment(normalize_version($release), $environment_results, true, ENV_SELECT_RELEASE)) {
print_upgrade_reload("index.php?agreelicense=1&lang=$CFG->lang");
} else {
echo $OUTPUT->notification(get_string('environmentok', 'admin'), 'notifysuccess');
Expand Down
2 changes: 1 addition & 1 deletion lib/installlib.php
Expand Up @@ -529,7 +529,7 @@ function install_cli_database(array $options, $interactive) {
}

// test environment first
if (!check_moodle_environment($version, $environment_results, false, ENV_SELECT_RELEASE)) {
if (!check_moodle_environment(normalize_version($release), $environment_results, false, ENV_SELECT_RELEASE)) {
$errors = environment_get_errors($environment_results);
cli_heading(get_string('environment', 'admin'));
foreach ($errors as $error) {
Expand Down

0 comments on commit 23580dd

Please sign in to comment.