mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-27121 fix incorrect check_moodle_environment() version parameter
This prevents Moodle 2.0 from using environment info for 2.1 in the installer and CLI upgrade.
This commit is contained in:
parent
6b14adf210
commit
1c71748dd1
@ -94,7 +94,7 @@ $oldversion = "$CFG->release ($CFG->version)";
|
||||
$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) {
|
||||
|
@ -153,7 +153,7 @@ if (!core_tables_exist()) {
|
||||
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');
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user