MDL-49329 admin: Start using API 1.3 for fetching available updates

This is not really necessary as there is no actual change in the
behaviour of the updates API between 1.2 and 1.3. However, as we plan to
use the new \core\update\api client for this in the future, it makes
only sense to have these two synced already now. In other words, Moodle
3.0 site will use the same version 1.3 for all download.moodle.org/api
end points.
This commit is contained in:
David Mudrák 2015-10-10 00:28:05 +02:00
parent aa1d100c2d
commit dbdd02c1fe

View file

@ -266,7 +266,7 @@ class checker {
throw new checker_exception('err_response_status', $response['status']);
}
if (empty($response['apiver']) or $response['apiver'] !== '1.2') {
if (empty($response['apiver']) or $response['apiver'] !== '1.3') {
throw new checker_exception('err_response_format_version', $response['apiver']);
}
@ -413,7 +413,7 @@ class checker {
if (!empty($CFG->config_php_settings['alternativeupdateproviderurl'])) {
return $CFG->config_php_settings['alternativeupdateproviderurl'];
} else {
return 'https://download.moodle.org/api/1.2/updates.php';
return 'https://download.moodle.org/api/1.3/updates.php';
}
}