X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fsvc_circuit.pm;h=13d84846e17aaf08b1aeff17b0a837554ccccc20;hp=408bd79e422dcdb069aa5ab17bd125bf33577699;hb=ff27c3f36240aee48ed50153dd5d8fe3ac3f2443;hpb=a87e91ee19d14a6fc3da62f4b44a9628d32bb6a3 diff --git a/FS/FS/svc_circuit.pm b/FS/FS/svc_circuit.pm index 408bd79e4..13d84846e 100644 --- a/FS/FS/svc_circuit.pm +++ b/FS/FS/svc_circuit.pm @@ -6,7 +6,7 @@ use base qw( FS::MAC_Mixin FS::svc_Common ); -use FS::Record qw( qsearch qsearchs ); +use FS::Record qw( dbh qsearch qsearchs ); use FS::circuit_provider; use FS::circuit_type; use FS::circuit_termination; @@ -221,9 +221,9 @@ sub label { sub search_sql { my ($class, $string) = @_; my @where = (); - push @where, 'LOWER(svc_circuit.circuit_id) = \''.lc($string).'\''; - push @where, 'LOWER(circuit_provider.provider) = \''.lc($string).'\''; - push @where, 'LOWER(circuit_type.typename) = \''.lc($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) . ')'; }