function imageinfo_cache_glue_url in Imageinfo Cache 7.3
Alt to http_build_url().
Parameters
mixed $parsed: Array from parse_url().
Return value
string URI is returned.
See also
http://php.net/parse-url#85963
1 call to imageinfo_cache_glue_url()
- imageinfo_cache_file_url_alter in ./
imageinfo_cache.module - Implements hook_file_url_alter().
File
- ./
imageinfo_cache.module, line 601 - Imageinfo Cache module.
Code
function imageinfo_cache_glue_url($parsed) {
if (!is_array($parsed)) {
return FALSE;
}
$uri = isset($parsed['scheme']) ? $parsed['scheme'] . ':' . (strtolower($parsed['scheme']) === 'mailto' ? '' : '//') : '';
$uri .= isset($parsed['user']) ? $parsed['user'] . (isset($parsed['pass']) ? ':' . $parsed['pass'] : '') . '@' : '';
$uri .= isset($parsed['host']) ? $parsed['host'] : '';
$uri .= !empty($parsed['port']) ? ':' . $parsed['port'] : '';
if (isset($parsed['path'])) {
$uri .= substr($parsed['path'], 0, 1) === '/' ? $parsed['path'] : (!empty($uri) ? '/' : '') . $parsed['path'];
}
$uri .= isset($parsed['query']) ? '?' . $parsed['query'] : '';
$uri .= isset($parsed['fragment']) ? '#' . $parsed['fragment'] : '';
return $uri;
}