#1051308 by dereine: Backport a test fix for views_handler_filter_date from d7v3ui.
authorDaniel Wehner
Fri, 4 Mar 2011 21:17:52 +0000 (22:17 +0100)
committerDaniel Wehner
Fri, 4 Mar 2011 21:17:52 +0000 (22:17 +0100)
CHANGELOG.txt
handlers/views_handler_filter_date.inc

index 5ea6f5e..229def9 100644 (file)
@@ -96,6 +96,7 @@ by dereine: Convert op_shorter/longer in filter_string to add_where_expression.
 #1078570 by duellj: Search filter doesn't work for attachments.
 #1068108 by boombatower: Allow row_class to contain multiple classes.
 #1078738 by dereine: Add a serialized data field handler and set users.data to it.
+#1051308 by dereine: Backport a test fix for views_handler_filter_date from d7v3ui.
 
 Views 3.x-7.x-alpha1 (05-Jan-2011)
 ==================================
index be9d97c..4aab56b 100644 (file)
@@ -140,7 +140,8 @@ class views_handler_filter_date extends views_handler_filter_numeric {
     // have a string if using offset.
     $placeholder1 = $this->placeholder();
     $placeholder2 = $this->placeholder();
-    $this->query->add_where_expression($this->options['group'], "$field BETWEEN $placeholder1 AND $placeholder2", array($placeholder1 => $a, $placeholder2 => $b));
+    $operator = strtoupper($this->operator);
+    $this->query->add_where_expression($this->options['group'], "$field $operator $placeholder1 AND $placeholder2", array($placeholder1 => $a, $placeholder2 => $b));
   }
 
   function op_simple($field) {