From 6bff5c39e564cc34c85c4d30e11f6ff14482548a Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Fri, 8 Jul 2005 09:18:22 +0000 Subject: Bug 87404: Attachments don't work if you need to use user matching Patch By Max Kanat-Alexander r=LpSolit, a=justdave --- attachment.cgi | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'attachment.cgi') diff --git a/attachment.cgi b/attachment.cgi index 1971f93a3..0c010a061 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -23,6 +23,7 @@ # Daniel Raichle # Dave Miller # Alexander J. Vincent +# Max Kanat-Alexander ################################################################################ # 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')); -- cgit v1.2.3-24-g4f1b