aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-08-31 15:00:23 +0000
committermkanat%kerio.com <>2005-08-31 15:00:23 +0000
commita094f0ebf0294b8f964fc3d93e4d60044af8353e (patch)
treee9a9563e00bb56c0a4b2e481e8bdf7cbcc0d3914 /editusers.cgi
parentBug 156670: Move the 'Alias' field on its own row when viewing a bug - Patch ... (diff)
downloadbugzilla-a094f0ebf0294b8f964fc3d93e4d60044af8353e.tar.gz
bugzilla-a094f0ebf0294b8f964fc3d93e4d60044af8353e.tar.bz2
bugzilla-a094f0ebf0294b8f964fc3d93e4d60044af8353e.zip
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';