diff --git modules/taxonomy/views_handler_filter_term_node_tid.inc modules/taxonomy/views_handler_filter_term_node_tid.inc index bca35ab..dfee9e0 100644 --- modules/taxonomy/views_handler_filter_term_node_tid.inc +++ modules/taxonomy/views_handler_filter_term_node_tid.inc @@ -18,6 +18,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on $options['limit'] = array('default' => TRUE); $options['vid'] = array('default' => 0); $options['hierarchy'] = array('default' => 0); + $options['error_message'] = array('default' => TRUE); return $options; } @@ -272,9 +273,12 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on $tids[] = $term->tid; } - if ($missing) { + if ($missing && !empty($this->options['error_message'])) { form_error($form, format_plural(count($missing), 'Unable to find term: @terms', 'Unable to find terms: @terms', array('@terms' => implode(', ', array_keys($missing))))); } + elseif ($missing && empty($this->options['error_message'])) { + $tids = array(0); + } return $tids; } @@ -288,6 +292,11 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on if ($this->options['type'] != 'select') { unset($form['expose']['reduce']); } + $form['error_message'] = array( + '#type' => 'checkbox', + '#title' => t('Display error message'), + '#default_value' => !empty($this->options['error_message']), + ); } function admin_summary() {