You are here

function l10n_update_get_server in Localization update 6

Same name and namespace in other branches
  1. 7 l10n_update.parser.inc \l10n_update_get_server()

Get server information

1 call to l10n_update_get_server()
l10n_update_server in ./l10n_update.module
Get server information, that can come from different sources.

File

./l10n_update.parser.inc, line 20
Extends the update parser to work with releases

Code

function l10n_update_get_server($server) {

  // Fetch up to date information if available
  if (!empty($server['server_url']) && ($fetch = l10n_update_fetch_server($server['server_url']))) {
    $server = array_merge($server, $fetch);
  }

  // If we have an update url this is ok, otherwise we return none
  if (!empty($server['update_url'])) {
    return $server;
  }
  else {
    return FALSE;
  }
}