summaryrefslogtreecommitdiffstats
path: root/contrib
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 /contrib
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 'contrib')
-rw-r--r--contrib/BugzillaEmail.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/BugzillaEmail.pm b/contrib/BugzillaEmail.pm
index 473169c9e..db31d1f24 100644
--- a/contrib/BugzillaEmail.pm
+++ b/contrib/BugzillaEmail.pm
@@ -16,6 +16,7 @@
# Gregor Fischer <fischer@suse.de>
# Klaas Freitag <freitag@suse.de>
# Seth Landsman <seth@dworkin.net>
+# Lance Larsh <lance.larsh@oracle.com>
# The purpose of this module is to abstract out a bunch of the code
# that is central to email interfaces to bugzilla and its database
@@ -54,8 +55,8 @@ sub findUser($) {
return $found_address;
} elsif ($email_transform eq $EMAIL_TRANSFORM_BASE_DOMAIN) {
my ($username) = ($address =~ /(.+)@/);
- my $stmt = "SELECT login_name FROM profiles WHERE " . $dbh->sql_istrcmp(
- 'login_name', $dbh->quote($username), $dbh->sql_regexp());
+ my $stmt = "SELECT login_name FROM profiles WHERE " . $dbh->sql_regexp(
+ $dbh->sql_istring('login_name'), $dbh->sql_istring($dbh->quote($username)));
SendSQL($stmt);
my $domain;
@@ -72,8 +73,8 @@ sub findUser($) {
return $new_address;
} elsif ($email_transform eq $EMAIL_TRANSFORM_NAME_ONLY) {
my ($username) = ($address =~ /(.+)@/);
- my $stmt = "SELECT login_name FROM profiles WHERE " .$dbh->sql_istrcmp(
- 'login_name', $dbh->quote($username), $dbh->sql_regexp());
+ my $stmt = "SELECT login_name FROM profiles WHERE " .$dbh->sql_regexp(
+ $dbh->sql_istring('login_name'), $dbh->sql_istring($dbh->quote($username)));
SendSQL($stmt);
my $found_address = FetchOneColumn();
return $found_address;