1 update.fetch.inc | _update_get_fetch_url_base($project) |
Returns the base of the URL to fetch available update data for a project.
Parameters
$project: The array of project information from update_get_projects().
Return value
The base of the URL used for fetching available update data. This does: not include the path elements to specify a particular project, version, site_key, etc.
See also
File
- core/
modules/ update/ update.fetch.inc, line 351 - Code required only when fetching information about available updates.
Code
function _update_get_fetch_url_base($project) {
// Specified manually, as from the update server.
if (isset($project['project status url'])) {
$url = $project['project status url'];
}
// Specified in the .info file.
elseif (isset($project['info']['project status url'])) {
$url = $project['info']['project status url'];
}
// The site default base URL.
else {
$url = config_get('update.settings', 'update_url');
if (empty($url)) {
$url = UPDATE_DEFAULT_URL;
}
}
return $url;
}