function weight_handler_sort::query in Weight 6
Same name and namespace in other branches
- 7 weight_handler_sort.inc \weight_handler_sort::query()
File
- views/weight_handler_sort.inc, line 7
- Sort handler for Weight module.
Class
- weight_handler_sort
- @file
Sort handler for Weight module.
Code
function query() {
$this
->ensure_my_table();
if ($this->options['order'] == 'ASC') {
$this->options['order'] = 'DESC';
}
elseif ($this->options['order'] == 'DESC') {
$this->options['order'] = 'ASC';
}
$this->query
->add_orderby($this->table_alias, $this->real_field, $this->options['order']);
}