function location_views_handler_arg_city in Location 5.3
Same name and namespace in other branches
- 5 contrib/location_views/location_views.module \location_views_handler_arg_city()
1 string reference to 'location_views_handler_arg_city'
- location_views_arguments in contrib/
location_views/ location_views.module
File
- contrib/
location_views/ location_views.module, line 718 - Views-enables the location module.
Code
function location_views_handler_arg_city($op, &$query, $argtype, $arg = '') {
switch ($op) {
case 'link':
// if using first letter directory, use strtoupper on the link
if ($len) {
return l($query->city == t('unknown') ? t('unknown') : strtoupper($query->city), "{$arg}/{$query->city}");
}
else {
return l($query->city == t('unknown') ? t('unknown') : $query->city, "{$arg}/{$query->city}");
}
default:
return location_views_handler_any($op, $query, $argtype, $arg, 'node', 'city');
}
}