You are here

function weight_handler_filter_weight::op_simple in Weight 6

Same name and namespace in other branches
  1. 7 weight_handler_filter_weight.inc \weight_handler_filter_weight::op_simple()

File

views/weight_handler_filter_weight.inc, line 31
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);
  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->operator} %d", $this->value['value']);
}