function location_handler_field_location_distance::click_sort in Location 7.5
Same name and namespace in other branches
- 6.3 handlers/location_handler_field_location_distance.inc \location_handler_field_location_distance::click_sort()
- 7.3 handlers/location_handler_field_location_distance.inc \location_handler_field_location_distance::click_sort()
- 7.4 handlers/location_handler_field_location_distance.inc \location_handler_field_location_distance::click_sort()
Called to determine what to tell the clicksorter.
Overrides views_handler_field::click_sort
File
- handlers/
location_handler_field_location_distance.inc, line 132 - Coordinates field handler.
Class
- location_handler_field_location_distance
- @file Coordinates field handler.
Code
function click_sort($order) {
$location = location_views_proximity_get_reference_location($this->view, $this->options);
if ($location) {
$this->query
->add_orderby(NULL, earth_distance_sql($location['longitude'], $location['latitude'], $this->table_alias), $order, $this->field_alias);
}
}