From a094f0ebf0294b8f964fc3d93e4d60044af8353e Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Wed, 31 Aug 2005 15:00:23 +0000 Subject: Bug 305976: Allow Bugzilla::DB sql_regexp/sql_not_regexp methods to accept string and pattern as arguments Patch By Lance Larsh r=joel, a=justdave --- editusers.cgi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'editusers.cgi') 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 +# Lance Larsh 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'; -- cgit v1.2.3-24-g4f1b