diff options
author | lpsolit%gmail.com <> | 2005-04-08 08:37:35 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-04-08 08:37:35 +0200 |
commit | 0ca4c4c49583b2dc680ace8ac9b7c80ea62d7f37 (patch) | |
tree | 44701b14670822af4b24a6f3628d447d72efb667 /attachment.cgi | |
parent | 004d0c1cf93ac47317b490f83523c799f8651afd (diff) | |
download | bugzilla-0ca4c4c49583b2dc680ace8ac9b7c80ea62d7f37.tar.gz bugzilla-0ca4c4c49583b2dc680ace8ac9b7c80ea62d7f37.tar.xz |
Bug 238878: Make hidden-fields template, User Matching and Flags use direct CGI instead of [% form.foo %] - Patch by Teemu Mannermaa <wicked@etlicon.fi> r=LpSolit a=justdave
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-x | attachment.cgi | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/attachment.cgi b/attachment.cgi index df25b768d..9f4b603dc 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -126,10 +126,11 @@ elsif ($action eq "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({ '^requestee(_type)?-(\d+)$' => - { 'type' => 'single' } }); - Bugzilla::Flag::validate(\%::FORM, $bugid); - Bugzilla::FlagType::validate(\%::FORM, $bugid, $::FORM{'id'}); + Bugzilla::User::match_field($cgi, { + '^requestee(_type)?-(\d+)$' => { 'type' => 'single' } + }); + Bugzilla::Flag::validate($cgi, $bugid); + Bugzilla::FlagType::validate($cgi, $bugid, $::FORM{'id'}); insert($data); } @@ -155,10 +156,11 @@ elsif ($action eq "update") # 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({ '^requestee(_type)?-(\d+)$' => - { 'type' => 'single' } }); - Bugzilla::Flag::validate(\%::FORM, $bugid); - Bugzilla::FlagType::validate(\%::FORM, $bugid, $::FORM{'id'}); + Bugzilla::User::match_field($cgi, { + '^requestee(_type)?-(\d+)$' => { 'type' => 'single' } + }); + Bugzilla::Flag::validate($cgi, $bugid); + Bugzilla::FlagType::validate($cgi, $bugid, $::FORM{'id'}); update(); } @@ -1033,7 +1035,7 @@ sub insert # Create flags. my $target = Bugzilla::Flag::GetTarget(undef, $attachid); - Bugzilla::Flag::process($target, $timestamp, \%::FORM); + Bugzilla::Flag::process($target, $timestamp, $cgi); # Define the variables and functions that will be passed to the UI template. $vars->{'mailrecipients'} = { 'changer' => Bugzilla->user->login, @@ -1168,7 +1170,7 @@ sub update # is obsoleting this attachment without deleting any requests # the user submits at the same time. my $target = Bugzilla::Flag::GetTarget(undef, $::FORM{'id'}); - Bugzilla::Flag::process($target, $timestamp, \%::FORM); + Bugzilla::Flag::process($target, $timestamp, $cgi); # Update the attachment record in the database. SendSQL("UPDATE attachments |