Index: handlers/views_handler_filter_float.inc =================================================================== RCS file: handlers/views_handler_filter_float.inc diff -N handlers/views_handler_filter_float.inc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ handlers/views_handler_filter_float.inc 25 Mar 2009 13:18:18 -0000 @@ -0,0 +1,23 @@ +operator == 'between') { + $this->query->add_where($this->options['group'], "$field >= %f", $this->value['min']); + $this->query->add_where($this->options['group'], "$field <= %f", $this->value['max']); + } + else { + $this->query->add_where($this->options['group'], "$field <= %f OR $field >= %f", $this->value['min'], $this->value['max']); + } + } + + function op_simple($field) { + $this->query->add_where($this->options['group'], "$field $this->operator %f", $this->value['value']); + } +} Index: handlers/views_handler_filter_numeric.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/handlers/views_handler_filter_numeric.inc,v retrieving revision 1.6 diff -u -p -r1.6 views_handler_filter_numeric.inc --- handlers/views_handler_filter_numeric.inc 28 Oct 2008 20:11:20 -0000 1.6 +++ handlers/views_handler_filter_numeric.inc 25 Mar 2009 13:18:18 -0000 @@ -301,24 +301,3 @@ class views_handler_filter_numeric exten return $rc; } } - -/** - * Simple filter to handle greater than/less than filters. - * It based on views_handler_filter_numeric but deals with - * float numbers. - */ -class views_handler_filter_float extends views_handler_filter_numeric { - function op_between($field) { - if ($this->operator == 'between') { - $this->query->add_where($this->options['group'], "$field >= %f", $this->value['min']); - $this->query->add_where($this->options['group'], "$field <= %f", $this->value['max']); - } - else { - $this->query->add_where($this->options['group'], "$field <= %f OR $field >= %f", $this->value['min'], $this->value['max']); - } - } - - function op_simple($field) { - $this->query->add_where($this->options['group'], "$field $this->operator %f", $this->value['value']); - } -} Index: includes/handlers.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/includes/handlers.inc,v retrieving revision 1.106 diff -u -p -r1.106 handlers.inc --- includes/handlers.inc 20 Feb 2009 23:02:09 -0000 1.106 +++ includes/handlers.inc 25 Mar 2009 13:18:20 -0000 @@ -1088,6 +1088,9 @@ function views_views_handlers() { 'views_handler_filter_numeric' => array( 'parent' => 'views_handler_filter', ), + 'views_handler_filter_float' => array( + 'parent' => 'views_handler_filter_numeric', + ), 'views_handler_filter_date' => array( 'parent' => 'views_handler_filter_numeric', ),