From c66dac87f16c9176c9c3bd298f44981a7b4878cb Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Wed, 8 Oct 2014 16:41:03 +0400 Subject: [PATCH] showattachment.cgi: remove CGI usage, code style --- showattachment.cgi | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/showattachment.cgi b/showattachment.cgi index e90a01533..e6a608c15 100755 --- a/showattachment.cgi +++ b/showattachment.cgi @@ -1,6 +1,4 @@ #!/usr/bin/perl -wT -# -*- Mode: perl; indent-tabs-mode: nil -*- -# # The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of @@ -28,13 +26,12 @@ use lib qw(. lib); use Bugzilla; use Bugzilla::Util; -my $cgi = Bugzilla->cgi; - -my $id = $cgi->param('attach_id'); +my $id = Bugzilla->input_params->{attach_id}; detaint_natural($id) if defined $id; $id ||= ""; -print $cgi->redirect(-location=>"attachment.cgi?id=$id", - -status=>'301 Permanent Redirect'); - +print Bugzilla->cgi->redirect( + -location => "attachment.cgi?id=$id", + -status => '301 Permanent Redirect', +); exit;