summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc15
1 files changed, 13 insertions, 2 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc
index 25f9a7b..7eb868f 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_filter_term_node_tid.
+ */
+
+/**
* Filter by term id.
*
* @ingroup views_filter_handlers
@@ -33,10 +38,10 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
$options = parent::option_definition();
$options['type'] = array('default' => 'textfield');
- $options['limit'] = array('default' => TRUE);
+ $options['limit'] = array('default' => TRUE, 'bool' => TRUE);
$options['vocabulary'] = array('default' => 0);
$options['hierarchy'] = array('default' => 0);
- $options['error_message'] = array('default' => TRUE);
+ $options['error_message'] = array('default' => TRUE, 'bool' => TRUE);
return $options;
}
@@ -168,6 +173,11 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
$keys = array_keys($options);
$default_value = array_shift($keys);
}
+ // Due to #1464174 there is a chance that array('') was saved in the admin ui.
+ // Let's choose a safe default value.
+ elseif ($default_value == array('')) {
+ $default_value = 'All';
+ }
else {
$copy = $default_value;
$default_value = array_shift($copy);
@@ -336,6 +346,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
$this->value_options = array();
if ($this->value) {
+ $this->value = array_filter($this->value);
$result = db_select('taxonomy_term_data', 'td')
->fields('td')
->condition('td.tid', $this->value)