You are here

function flag_handler_filter_flagged::query in Flag 7.2

Same name and namespace in other branches
  1. 6.2 includes/flag_handler_filter_flagged.inc \flag_handler_filter_flagged::query()
  2. 6 includes/flag_handler_filter_flagged.inc \flag_handler_filter_flagged::query()
  3. 7.3 includes/views/flag_handler_filter_flagged.inc \flag_handler_filter_flagged::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

includes/flag_handler_filter_flagged.inc, line 29
Contains the flagged content filter handler.

Class

flag_handler_filter_flagged
Handler to filter for content that has not been flagged.

Code

function query() {
  $operator = $this->value ? 'IS NOT' : 'IS';
  $this->query
    ->add_where($this->options['group'], $this->relationship . '.uid', NULL, $operator . ' NULL');
}