diff options
author | mkanat%kerio.com <> | 2005-08-31 15:00:23 +0000 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-08-31 15:00:23 +0000 |
commit | a094f0ebf0294b8f964fc3d93e4d60044af8353e (patch) | |
tree | e9a9563e00bb56c0a4b2e481e8bdf7cbcc0d3914 /contrib | |
parent | ce0851b8e3b62e99f793c7d8208a4b07851a491a (diff) | |
download | bugs-a094f0ebf0294b8f964fc3d93e4d60044af8353e.tar bugs-a094f0ebf0294b8f964fc3d93e4d60044af8353e.tar.gz bugs-a094f0ebf0294b8f964fc3d93e4d60044af8353e.tar.bz2 bugs-a094f0ebf0294b8f964fc3d93e4d60044af8353e.tar.xz bugs-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 'contrib')
-rw-r--r-- | contrib/BugzillaEmail.pm | 9 |
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; |