You are here

function _upgrade_status_build_fetch_url in Upgrade Status 5

Same name and namespace in other branches
  1. 6 upgrade_status.fetch.inc \_upgrade_status_build_fetch_url()
  2. 7 upgrade_status.fetch.inc \_upgrade_status_build_fetch_url()

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().

$version: The target version of Drupal core you wish to query.

See also

upgrade_status_refresh()

update_status_get_projects()

1 call to _upgrade_status_build_fetch_url()
upgrade_status_refresh in ./upgrade_status.admin.inc
Fetch project info via XML from a central server.

File

./upgrade_status.admin.inc, line 626
Checks to see if your installed modules are available for the next major release of Drupal.

Code

function _upgrade_status_build_fetch_url($project, $version) {
  $default_url = variable_get('upgrade_status_fetch_url', UPGRADE_STATUS_DEFAULT_URL);
  if (!isset($project['info']['project status url'])) {
    $project['info']['project status url'] = $default_url;
  }
  $name = $project['name'];
  $url = $project['info']['project status url'];
  $url .= '/' . $name . '/' . $version;
  return $url;
}