You are here

function node_noindex_filter_handler::query in Node Noindex 7

Same name and namespace in other branches
  1. 6 node_noindex_filter_handler.inc \node_noindex_filter_handler::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

./node_noindex_filter_handler.inc, line 13
Filter by whether a node is indexed or not.

Class

node_noindex_filter_handler
@file Filter by whether a node is indexed or not.

Code

function query() {
  $this
    ->ensure_my_table();
  if ($this->value == 1) {
    $this->query
      ->add_where_expression($this->options['group'], "{$this->table_alias}.noindex is NULL OR {$this->table_alias}.noindex = 0", array());
  }
  else {
    $this->query
      ->add_where($this->options['group'], "{$this->table_alias}.noindex", "1", "=");
  }
}