MDL-35238 Fetch available updates using the 1.1 version of the API

If the stored response has still 1.0 version (which is expected during
the upgrade to 2.4), a debugging message is displayed. Added a string to
explain what's going on and how to recover from the state.
This commit is contained in:
David Mudrák
2012-11-08 22:33:07 +01:00
parent 08c3bc006d
commit 85d7516313
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -852,7 +852,7 @@ class available_update_checker {
throw new available_update_checker_exception('err_response_status', $response['status']);
}
if (empty($response['apiver']) or $response['apiver'] !== '1.0') {
if (empty($response['apiver']) or $response['apiver'] !== '1.1') {
throw new available_update_checker_exception('err_response_format_version', $response['apiver']);
}
@@ -990,7 +990,7 @@ class available_update_checker {
if (!empty($CFG->alternativeupdateproviderurl)) {
return $CFG->alternativeupdateproviderurl;
} else {
return 'http://download.moodle.org/api/1.0/updates.php';
return 'http://download.moodle.org/api/1.1/updates.php';
}
}