[Rt-commit] r3443 - in DBIx-SearchBuilder/trunk: .
SearchBuilder/Handle
glasser at bestpractical.com
glasser at bestpractical.com
Fri Jul 8 16:36:17 EDT 2005
Author: glasser
Date: Fri Jul 8 16:36:15 2005
New Revision: 3443
Modified:
DBIx-SearchBuilder/trunk/ (props changed)
DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Pg.pm
Log:
r36560 at tin-foil: glasser | 2005-07-08 17:35:42 -0300
* For Pg, don't try to lowercase quoted numbers either.
* replace 'want' with 'howmany', because of a bug in Want.pm (thanks to Tom Yu)
Modified: DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Pg.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Pg.pm (original)
+++ DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Pg.pm Fri Jul 8 16:36:15 2005
@@ -6,7 +6,7 @@
use vars qw($VERSION @ISA $DBIHandle $DEBUG);
use base qw(DBIx::SearchBuilder::Handle);
-use Want qw(want);
+use Want qw(want howmany);
use strict;
@@ -139,7 +139,7 @@
my $value = shift;
- if ($value =~ /^\d+$/) { # we don't need to downcase numeric values
+ if ($value =~ /^['"]?\d+['"]?$/) { # we don't need to downcase numeric values
return ( $field, $operator, $value);
}
@@ -148,7 +148,7 @@
return ( $field, $operator, $value );
}
elsif ( $operator =~ /=/ ) {
- if (want(4)) {
+ if (howmany() >= 4) {
return ( "LOWER($field)", $operator, $value, "LOWER(?)");
}
# RT 3.0.x and earlier don't know how to cope with a "LOWER" function
More information about the Rt-commit
mailing list