function weight_handler_filter_sticky::query in Weight 7
Same name and namespace in other branches
- 6 views/weight_handler_filter_sticky.inc \weight_handler_filter_sticky::query()
Add this filter to the query.
Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.
Overrides views_handler_filter_boolean_operator::query
File
- ./
weight_handler_filter_sticky.inc, line 8 - Field handler for Weight module.
Class
- weight_handler_filter_sticky
- @file Field handler for Weight module.
Code
function query() {
$this
->ensure_my_table();
$where = "{$this->table_alias}.{$this->real_field} ";
if (empty($this->value)) {
$where .= '<= 0';
}
else {
$where .= ' > 0';
}
$this->query
->add_where($this->options['group'], $where);
}