function _update_status_build_fetch_url in Update Status 5.2
Generates the URL to fetch information about project updates.
This figures out the right URL to use, based on the project's .info file and the global defaults. Appends optional query arguments when the site is configured to report usage stats.
Parameters
$project: The array of project information from update_status_get_projects().
$site_key: The anonymous site key hash (optional).
See also
1 call to _update_status_build_fetch_url()
- update_status_refresh in ./
update_status.module - Fetch project info via XML from a central server.
File
- ./
update_status.module, line 1604
Code
function _update_status_build_fetch_url($project, $site_key = '') {
$name = $project['name'];
$url = _update_status_get_fetch_url_base($project);
$url .= '/' . $name . '/' . UPDATE_STATUS_CORE_VERSION;
if (!empty($site_key) && (empty($project['project_type']) || strpos($project['project_type'], 'disabled') === FALSE)) {
$url .= strpos($url, '?') === TRUE ? '&' : '?';
$url .= 'site_key=';
$url .= drupal_urlencode($site_key);
if (!empty($project['info']['version'])) {
$url .= '&version=';
$url .= drupal_urlencode($project['info']['version']);
}
}
return $url;
}