summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-03-02 21:23:34 +0100
committerlpsolit%gmail.com <>2009-03-02 21:23:34 +0100
commit57886ccea2f55e517bd06e7a8f5b90bbf407ab97 (patch)
tree1dbb4b37c187315b102f4830ebfd32d0cbe998e1
parent0b69cb3e02ed0a2b1eb2f268962355cb659065bb (diff)
downloadbugzilla-57886ccea2f55e517bd06e7a8f5b90bbf407ab97.tar.gz
bugzilla-57886ccea2f55e517bd06e7a8f5b90bbf407ab97.tar.xz
Bug 480999: Irrelevant username check in the 'Email Addresses, Bug Numbers, and Votes' section if no checkbox is checked - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
-rw-r--r--Bugzilla/Search.pm21
1 files changed, 12 insertions, 9 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 2f86d2502..0c0a76562 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -237,15 +237,7 @@ sub init {
next;
}
my $type = $params->param("emailtype$id");
- if ($type eq "exact") {
- $type = "anyexact";
- foreach my $name (split(',', $email)) {
- $name = trim($name);
- if ($name) {
- login_to_id($name, THROW_ERROR);
- }
- }
- }
+ $type = "anyexact" if ($type eq "exact");
my @clist;
foreach my $field ("assigned_to", "reporter", "cc", "qa_contact") {
@@ -259,6 +251,17 @@ sub init {
if (@clist) {
push(@specialchart, \@clist);
}
+ else {
+ # No field is selected. Nothing to see here.
+ next;
+ }
+
+ if ($type eq "anyexact") {
+ foreach my $name (split(',', $email)) {
+ $name = trim($name);
+ login_to_id($name, THROW_ERROR) if $name;
+ }
+ }
}
my $chfieldfrom = trim(lc($params->param('chfieldfrom'))) || '';