summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-07-08 11:18:22 +0200
committermkanat%kerio.com <>2005-07-08 11:18:22 +0200
commit6bff5c39e564cc34c85c4d30e11f6ff14482548a (patch)
tree1726f81292e7dd3d82ec3b6ac366de06826105a7 /attachment.cgi
parente29e57574269f0771561a0f1b6039fd4809391a3 (diff)
downloadbugzilla-6bff5c39e564cc34c85c4d30e11f6ff14482548a.tar.gz
bugzilla-6bff5c39e564cc34c85c4d30e11f6ff14482548a.tar.xz
Bug 87404: Attachments don't work if you need to use user matching
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi16
1 files changed, 13 insertions, 3 deletions
diff --git a/attachment.cgi b/attachment.cgi
index 1971f93a3..0c010a061 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -23,6 +23,7 @@
# Daniel Raichle <draichle@gmx.net>
# Dave Miller <justdave@syndicomm.com>
# Alexander J. Vincent <ajvincent@juno.com>
+# Max Kanat-Alexander <mkanat@bugzilla.org>
################################################################################
# Script Initialization
@@ -900,9 +901,18 @@ sub insert
# The order of these function calls is important, as both Flag::validate
# and FlagType::validate assume User::match_field has ensured that the
# values in the requestee fields are legitimate user email addresses.
- Bugzilla::User::match_field($cgi, {
- '^requestee(_type)?-(\d+)$' => { 'type' => 'single' }
- });
+ my $match_status = Bugzilla::User::match_field($cgi, {
+ '^requestee(_type)?-(\d+)$' => { 'type' => 'single' },
+ }, MATCH_SKIP_CONFIRM);
+
+ $vars->{'match_field'} = 'requestee';
+ if ($match_status == USER_MATCH_FAILED) {
+ $vars->{'message'} = 'user_match_failed';
+ }
+ elsif ($match_status == USER_MATCH_MULTIPLE) {
+ $vars->{'message'} = 'user_match_multiple';
+ }
+
Bugzilla::Flag::validate($cgi, $bugid);
Bugzilla::FlagType::validate($cgi, $bugid, $cgi->param('id'));