my @andlist;
my %chartfields;
+ my $dbh = Bugzilla->dbh;
+
&::GetVersionTable();
# First, deal with all the old hard-coded non-chart-based poop.
} elsif ($t eq "notequal") {
$oper = "<>";
} elsif ($t eq "regexp") {
- $oper = "REGEXP";
+ $oper = $dbh->sql_regexp();
} elsif ($t eq "notregexp") {
- $oper = "NOT REGEXP";
+ $oper = $dbh->sql_not_regexp();
} else {
$oper = "noop";
}
$term = "INSTR(LOWER($ff), " . lc($q) . ") = 0";
},
",regexp" => sub {
- $term = "LOWER($ff) REGEXP $q";
+ $term = "LOWER($ff) " . $dbh->sql_regexp() . " $q";
},
",notregexp" => sub {
- $term = "LOWER($ff) NOT REGEXP $q";
+ $term = "LOWER($ff) " . $dbh->sql_not_regexp() . " $q";
},
",lessthan" => sub {
$term = "$ff < $q";
sub GetByWordList {
my ($field, $strs) = (@_);
my @list;
+ my $dbh = Bugzilla->dbh;
foreach my $w (split(/[\s,]+/, $strs)) {
my $word = $w;
$word =~ s/^'//;
$word =~ s/'$//;
$word = '(^|[^a-z0-9])' . $word . '($|[^a-z0-9])';
- push(@list, "lower($field) regexp '$word'");
+ push(@list, "lower($field) " . $dbh->sql_regexp() . " '$word'");
}
}
my $localtrailer = '<a href="editusers.cgi?">edit more users</a>';
my $candelete = Param('allowuserdeletion');
-
+my $dbh = Bugzilla->dbh;
#
# action='' -> Ask for match string for users.
$query .= "like";
$matchstr = '%' . $matchstr . '%';
} elsif ($::FORM{'matchtype'} eq 'regexp') {
- $query .= "regexp";
+ $query .= $dbh->sql_regexp();
$matchstr = '.'
unless $matchstr;
} elsif ($::FORM{'matchtype'} eq 'notregexp') {
- $query .= "not regexp";
+ $query .= $dbh->sql_not_regexp();
$matchstr = '.'
unless $matchstr;
} else {