function weight_handler_filter_weight::op_simple in Weight 7
Same name and namespace in other branches
- 6 views/weight_handler_filter_weight.inc \weight_handler_filter_weight::op_simple()
Overrides views_handler_filter_numeric::op_simple
File
- ./
weight_handler_filter_weight.inc, line 30 - Filter handler for Weight module.
Class
- weight_handler_filter_weight
- @file Filter handler for Weight module.
Code
function op_simple($field) {
// convert value
$this->value['value'] = -($this->value['value'] + 100);
// reverse the operator because we use the sticky field backwards
if (strpos($this->operator, '<') !== FALSE) {
$this->operator = str_replace('<', '>', $this->operator);
}
elseif (strpos($this->operator, '>') !== FALSE) {
$this->operator = str_replace('>', '<', $this->operator);
}
$this->query
->add_where($this->options['group'], $field, $this->value['value'], $this->operator);
}