diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-11-10 23:20:55 -0600 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-11-10 23:24:39 -0600 |
commit | a93d85b710311eeaeb5cb6f5e987ee3f8e0a1c81 (patch) | |
tree | 7ec0b4207e4ad1f24be38755dfee0010f4576af1 | |
parent | 0e1e72497fe8a045631f1f060ea63b506df3d238 (diff) |
RT#38597: OQM - svc Circuit use and setup [fixed sql quoting]
-rw-r--r-- | FS/FS/svc_circuit.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/FS/FS/svc_circuit.pm b/FS/FS/svc_circuit.pm index 408bd79e4..1a42efadd 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) = ' . dbh->quote($string); + push @where, 'LOWER(circuit_provider.provider) = ' . dbh->quote($string); + push @where, 'LOWER(circuit_type.typename) = ' . dbh->quote($string); '(' . join(' OR ', @where) . ')'; } |