function theme_google_appliance_cached_link in Google Search Appliance 6.2
Theme cached link
1 theme call to theme_google_appliance_cached_link()
- theme_google_appliance_search_result_array in ./
google_appliance.module - Theme the search results for hook_search().
File
- ./
google_appliance.module, line 1343 - Google Search Appliance (GSA) / Google Mini integration
Code
function theme_google_appliance_cached_link($link, $cid, $keys) {
$google_appliance_host_name = variable_get('google_appliance_host_name', '');
$google_appliance_default_client = variable_get('google_appliance_default_client', '');
$keys = '+' . str_replace(' ', '+', $keys);
if (isset($google_appliance_host_name)) {
// lose protocol part of the $link url.
preg_match('/^\\w+\\:\\/\\/(.+)/', $link, $matches);
if (!empty($matches)) {
$url = 'http://' . $google_appliance_host_name . '/search?q=cache:' . $cid . ':' . $matches[1] . $keys . '&proxystylesheet=' . $google_appliance_default_client;
return l('cached version', $url);
}
}
}