summaryrefslogtreecommitdiffstats
path: root/editusers.cgi
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-08-31 17:00:23 +0200
committermkanat%kerio.com <>2005-08-31 17:00:23 +0200
commita094f0ebf0294b8f964fc3d93e4d60044af8353e (patch)
treee9a9563e00bb56c0a4b2e481e8bdf7cbcc0d3914 /editusers.cgi
parentce0851b8e3b62e99f793c7d8208a4b07851a491a (diff)
downloadbugzilla-a094f0ebf0294b8f964fc3d93e4d60044af8353e.tar.gz
bugzilla-a094f0ebf0294b8f964fc3d93e4d60044af8353e.tar.xz
Bug 305976: Allow Bugzilla::DB sql_regexp/sql_not_regexp methods to accept string and pattern as arguments
Patch By Lance Larsh <lance.larsh@oracle.com> r=joel, a=justdave
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-xeditusers.cgi10
1 files changed, 6 insertions, 4 deletions
diff --git a/editusers.cgi b/editusers.cgi
index 0d413f2ca..b7ce52b3e 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -14,6 +14,7 @@
# The Original Code is the Bugzilla Bug Tracking System.
#
# Contributor(s): Marc Schumann <wurblzap@gmail.com>
+# Lance Larsh <lance.larsh@oracle.com>
use strict;
use lib ".";
@@ -109,15 +110,16 @@ if ($action eq 'search') {
else {
# Handle selection by user name.
if (defined($matchtype)) {
- $query .= " $nextCondition profiles.login_name ";
+ $query .= " $nextCondition ";
+ my $expr = "profiles.login_name";
if ($matchtype eq 'regexp') {
- $query .= $dbh->sql_regexp . ' ?';
+ $query .= $dbh->sql_regexp($expr, '?');
$matchstr = '.' unless $matchstr;
} elsif ($matchtype eq 'notregexp') {
- $query .= $dbh->sql_not_regexp . ' ?';
+ $query .= $dbh->sql_not_regexp($expr, '?');
$matchstr = '.' unless $matchstr;
} else { # substr or unknown
- $query .= 'like ?';
+ $query .= $expr . ' like ?';
$matchstr = "%$matchstr%";
}
$nextCondition = 'AND';