You are here

function views_handler_filter_term_node_tid::accept_exposed_input in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 modules/taxonomy/views_handler_filter_term_node_tid.inc \views_handler_filter_term_node_tid::accept_exposed_input()
  2. 7.3 modules/taxonomy/views_handler_filter_term_node_tid.inc \views_handler_filter_term_node_tid::accept_exposed_input()

Check to see if input from the exposed filters should change the behavior of this filter.

Overrides views_handler_filter_in_operator::accept_exposed_input

File

modules/taxonomy/views_handler_filter_term_node_tid.inc, line 190

Class

views_handler_filter_term_node_tid
Filter by term id

Code

function accept_exposed_input($input) {
  if (empty($this->options['exposed'])) {
    return TRUE;
  }

  // If it's optional and there's no value don't bother filtering.
  if ($this->options['expose']['optional'] && empty($this->validated_exposed_input)) {
    return FALSE;
  }
  $rc = parent::accept_exposed_input($input);
  if ($rc) {

    // If we have previously validated input, override.
    if (isset($this->validated_exposed_input)) {
      $this->value = $this->validated_exposed_input;
    }
  }
  return $rc;
}