RT#38597: OQM - svc Circuit use and setup [fixed case handling]
authorJonathan Prykop <jonathan@freeside.biz>
Thu, 25 Feb 2016 18:56:28 +0000 (12:56 -0600)
committerJonathan Prykop <jonathan@freeside.biz>
Thu, 25 Feb 2016 18:56:28 +0000 (12:56 -0600)
FS/FS/svc_circuit.pm

index 1a42efa..13d8484 100644 (file)
@@ -221,9 +221,9 @@ sub label {
 sub search_sql {
   my ($class, $string) = @_;
   my @where = ();
-  push @where, 'LOWER(svc_circuit.circuit_id) = ' . dbh->quote($string);
-  push @where, 'LOWER(circuit_provider.provider) = ' . dbh->quote($string);
-  push @where, 'LOWER(circuit_type.typename) = ' . dbh->quote($string);
+  push @where, 'LOWER(svc_circuit.circuit_id) = LOWER(' . dbh->quote($string) . ')';
+  push @where, 'LOWER(circuit_provider.provider) = LOWER(' . dbh->quote($string) . ')';
+  push @where, 'LOWER(circuit_type.typename) = LOWER(' . dbh->quote($string) . ')';
   '(' . join(' OR ', @where) . ')';
 }