/[drupal]/contributions/modules/views/handlers/views_handler_filter_float.inc
ViewVC logotype

Contents of /contributions/modules/views/handlers/views_handler_filter_float.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Mar 25 17:29:33 2009 UTC (8 months ago) by merlinofchaos
Branch: MAIN
CVS Tags: DRUPAL-6--2-7, DRUPAL-6--2-6, DRUPAL-6--2-5, DRUPAL-6--2-4, DRUPAL-6--3-0-ALPHA1, HEAD
Branch point for: DRUPAL-6--2, DRUPAL-6--3, DRUPAL-7--3
File MIME type: text/x-php
#412576 by yhahn: Restore missing views_handler_filter_float class.
1 <?php
2 // $Id$
3
4 /**
5 * Simple filter to handle greater than/less than filters.
6 * It based on views_handler_filter_numeric but deals with
7 * float numbers.
8 */
9 class views_handler_filter_float extends views_handler_filter_numeric {
10 function op_between($field) {
11 if ($this->operator == 'between') {
12 $this->query->add_where($this->options['group'], "$field >= %f", $this->value['min']);
13 $this->query->add_where($this->options['group'], "$field <= %f", $this->value['max']);
14 }
15 else {
16 $this->query->add_where($this->options['group'], "$field <= %f OR $field >= %f", $this->value['min'], $this->value['max']);
17 }
18 }
19
20 function op_simple($field) {
21 $this->query->add_where($this->options['group'], "$field $this->operator %f", $this->value['value']);
22 }
23 }

  ViewVC Help
Powered by ViewVC 1.1.2