You are here

function _l10n_update_file_is_remote in Localization update 7.2

Determine if a file is a remote file.

Parameters

string $uri: The URI or URI pattern of the file.

Return value

bool TRUE if the $uri is a remote file.

1 call to _l10n_update_file_is_remote()
l10n_update_source_build in ./l10n_update.translation.inc
Builds abstract translation source.

File

./l10n_update.translation.inc, line 370
Common API for interface translation.

Code

function _l10n_update_file_is_remote($uri) {
  $scheme = file_uri_scheme($uri);
  if ($scheme) {
    if ($scheme == 'http' || $scheme == 'https') {
      return TRUE;
    }
    return !drupal_realpath($scheme . '://');
  }
  return FALSE;
}