From: Frank Lichtenheld Date: Mon, 18 Jun 2007 00:28:22 +0000 (+0200) Subject: remove the html_header argument from do_* calls X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=49052885778c856da9b93a5f2f9e8877a827c3c5;p=deb%2Fpackages.git remove the html_header argument from do_* calls It has long stopped being used, so it just clutters the code. --- diff --git a/cgi-bin/dispatcher.pl b/cgi-bin/dispatcher.pl index 72117d6..b4374cb 100755 --- a/cgi-bin/dispatcher.pl +++ b/cgi-bin/dispatcher.pl @@ -299,11 +299,10 @@ unless (-e "$TEMPLATEDIR/$opts{format}/${what_to_do}.tmpl") { "406 requested format not available"); } -my (%html_header, %page_content); +my (%page_content); unless (@Packages::CGI::fatal_errors) { no strict 'refs'; - &{"do_$what_to_do"}( \%params, \%opts, \%html_header, - \%page_content ); + &{"do_$what_to_do"}( \%params, \%opts, \%page_content ); } $page_content{opts} = \%opts; @@ -320,7 +319,7 @@ $page_content{string2id} = sub { return &Packages::CGI::string2id(@_) }; unless (@Packages::CGI::fatal_errors) { print $input->header(-charset => $charset, -type => get_mime($opts{format}) ); #use Data::Dumper; - #print '
'.Dumper(\%ENV, \%html_header, \%page_content, get_all_messages()).'
'; + #print '
'.Dumper(\%ENV, \%page_content, get_all_messages()).'
'; print $template->page( $what_to_do, { %page_content, %{ get_all_messages() } } ); my $tet1 = new Benchmark; my $tetd = timediff($tet1, $tet0); diff --git a/lib/Packages/DoDownload.pm b/lib/Packages/DoDownload.pm index bd7f8e1..7c59272 100644 --- a/lib/Packages/DoDownload.pm +++ b/lib/Packages/DoDownload.pm @@ -21,7 +21,7 @@ our @EXPORT = qw( do_download ); sub do_download { - my ($params, $opts, $html_header, $page_content) = @_; + my ($params, $opts, $page_content) = @_; if ($params->{errors}{package}) { fatal_error( _g( "package not valid or not specified" ) ); diff --git a/lib/Packages/DoFilelist.pm b/lib/Packages/DoFilelist.pm index 97e9f01..c806190 100644 --- a/lib/Packages/DoFilelist.pm +++ b/lib/Packages/DoFilelist.pm @@ -24,7 +24,7 @@ our @ISA = qw( Exporter ); our @EXPORT = qw( do_filelist ); sub do_filelist { - my ($params, $opts, $html_header, $page_content) = @_; + my ($params, $opts, $page_content) = @_; if ($params->{errors}{package}) { fatal_error( _g( "package not valid or not specified" ) ); diff --git a/lib/Packages/DoIndex.pm b/lib/Packages/DoIndex.pm index 239f330..8f96fdf 100644 --- a/lib/Packages/DoIndex.pm +++ b/lib/Packages/DoIndex.pm @@ -25,7 +25,7 @@ my %encoding = ( 'txt.gz' => 'x-gzip', ); sub send_file { - my ($file, $params, $opts, $html_header) = @_; + my ($file, $params, $opts) = @_; if ($params->{errors}{suite}) { fatal_error( _g( "suite not valid or not specified" ) ); diff --git a/lib/Packages/DoNewPkg.pm b/lib/Packages/DoNewPkg.pm index 362c426..c9e0ca2 100644 --- a/lib/Packages/DoNewPkg.pm +++ b/lib/Packages/DoNewPkg.pm @@ -19,7 +19,7 @@ use Packages::DB; use Packages::Config qw( $TOPDIR @SECTIONS $ROOT ); sub do_newpkg { - my ($params, $opts, $html_header, $page_content) = @_; + my ($params, $opts, $page_content) = @_; if ($params->{errors}{suite}) { fatal_error( _g( "suite not valid or not specified" ) ); diff --git a/lib/Packages/DoSearch.pm b/lib/Packages/DoSearch.pm index d395a31..5f91d24 100644 --- a/lib/Packages/DoSearch.pm +++ b/lib/Packages/DoSearch.pm @@ -19,7 +19,7 @@ use Packages::DB; use Packages::Config qw( $DBDIR @SUITES @ARCHIVES $ROOT ); sub do_search { - my ($params, $opts, $html_header, $page_content) = @_; + my ($params, $opts, $page_content) = @_; $Params::Search::too_many_hits = 0; diff --git a/lib/Packages/DoSearchContents.pm b/lib/Packages/DoSearchContents.pm index 101c10c..29b7977 100644 --- a/lib/Packages/DoSearchContents.pm +++ b/lib/Packages/DoSearchContents.pm @@ -19,7 +19,7 @@ use Packages::DB; use Packages::Config qw( $DBDIR @SUITES @ARCHIVES @ARCHITECTURES $ROOT ); sub do_search_contents { - my ($params, $opts, $html_header, $page_content) = @_; + my ($params, $opts, $page_content) = @_; if ($params->{errors}{keywords}) { fatal_error( _g( "keyword not valid or missing" ) ); diff --git a/lib/Packages/DoShow.pm b/lib/Packages/DoShow.pm index e47ec6b..419c597 100644 --- a/lib/Packages/DoShow.pm +++ b/lib/Packages/DoShow.pm @@ -24,7 +24,7 @@ our @ISA = qw( Exporter ); our @EXPORT = qw( do_show ); sub do_show { - my ($params, $opts, $html_header, $page_contents) = @_; + my ($params, $opts, $page_contents) = @_; if ($params->{errors}{package}) { fatal_error( _g( "package not valid or not specified" ) );