summaryrefslogtreecommitdiffstats
path: root/showattachment.cgi
diff options
context:
space:
mode:
authorbbaetz%acm.org <>2003-05-05 10:15:19 +0200
committerbbaetz%acm.org <>2003-05-05 10:15:19 +0200
commit9488a8906592564ec2e7601041f3ea5484cde3cc (patch)
treeb9308d1a3dcf639d1e561ede1186ff58afc01834 /showattachment.cgi
parentc000c0a480f2cb73f2b0b89550bbd8e496b73c9d (diff)
downloadbugzilla-9488a8906592564ec2e7601041f3ea5484cde3cc.tar.gz
bugzilla-9488a8906592564ec2e7601041f3ea5484cde3cc.tar.xz
Bug 201816 - use CGI.pm for header output
r=joel, a=justdave
Diffstat (limited to 'showattachment.cgi')
-rwxr-xr-xshowattachment.cgi18
1 files changed, 11 insertions, 7 deletions
diff --git a/showattachment.cgi b/showattachment.cgi
index bfe9ef988..82fc1ba9a 100755
--- a/showattachment.cgi
+++ b/showattachment.cgi
@@ -25,12 +25,16 @@ use strict;
use lib qw(.);
-require "CGI.pl";
+use Bugzilla;
+use Bugzilla::Util;
+
+my $cgi = Bugzilla->cgi;
+
+my $id = $cgi->param('attach_id');
+detaint_natural($id) if defined $id;
+$id ||= "";
+
+print $cgi->redirect(-location=>"attachment.cgi?id=$id&action=view",
+ -status=>'301 Permanent Redirect');
-# Redirect to the new interface for displaying attachments.
-detaint_natural($::FORM{'attach_id'}) if defined($::FORM{'attach_id'});
-my $id = $::FORM{'attach_id'} || "";
-print "Status: 301 Permanent Redirect\n";
-print "Location: attachment.cgi?id=$id&action=view\n\n";
exit;
-