Index: handlers/views_handler_filter_date.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/handlers/views_handler_filter_date.inc,v retrieving revision 1.3.6.8 diff -u -p -r1.3.6.8 views_handler_filter_date.inc --- handlers/views_handler_filter_date.inc 7 Jan 2011 18:10:54 -0000 1.3.6.8 +++ handlers/views_handler_filter_date.inc 23 Feb 2011 01:06:49 -0000 @@ -137,11 +137,9 @@ class views_handler_filter_date extends $a = '***CURRENT_TIME***' . sprintf('%+d', $a); // keep sign $b = '***CURRENT_TIME***' . sprintf('%+d', $b); // keep sign } - // %s is safe here because strtotime scrubbed the input and we might - // 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)); + // This is safe because we are manually scrubbing the values. + // It is necessary to do it this way because $a and $b are formulas when using an offset! + $this->query->add_where_expression($this->options['group'], "$field BETWEEN $a AND $b", array()); } function op_simple($field) { @@ -149,7 +147,8 @@ class views_handler_filter_date extends if (!empty($this->value['type']) && $this->value['type'] == 'offset') { $value = '***CURRENT_TIME***' . sprintf('%+d', $value); // keep sign } - $placeholder = $this->placeholder(); - $this->query->add_where($this->options['group'], "$field $this->operator $placeholder", array($placeholder => $value), 'formula'); + // This is safe because we are manually scrubbing the value. + // It is necessary to do it this way because $value is a formula when using an offset! + $this->query->add_where_expression($this->options['group'], "$field $this->operator $value"); } }