summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-11-10 23:20:55 -0600
committerJonathan Prykop <jonathan@freeside.biz>2015-11-10 23:37:02 -0600
commitb527fe6618343b4e973955c295d761127b06859e (patch)
tree7e00716508cee8e7580bacd1a387a54514d1e0aa
parentafd8bcfd6fbbc40f7fa72df58166afc6e42ddf6d (diff)
RT#38597: OQM - svc Circuit use and setup [fixed sql quoting]
-rw-r--r--FS/FS/svc_circuit.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/FS/FS/svc_circuit.pm b/FS/FS/svc_circuit.pm
index 520e881b4..8ec0dadce 100644
--- a/FS/FS/svc_circuit.pm
+++ b/FS/FS/svc_circuit.pm
@@ -6,7 +6,7 @@ use base qw(
FS::svc_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) . ')';
}