X-Git-Url: https://git.deb.at/?p=deb%2Fpackages.git;a=blobdiff_plain;f=lib%2FPackages%2FDoFilelist.pm;h=f76efb91e2bfc429cab119a7ea211ef26b784be4;hp=dba1d4b74eaf47b71b8fcf1cf740c0fe97f4d874;hb=7a5ca633d65f3e890f74aa8aba17accbc17ac432;hpb=d9c10aaf0bb03bfb75404f9041967b9f91012bdb diff --git a/lib/Packages/DoFilelist.pm b/lib/Packages/DoFilelist.pm index dba1d4b..f76efb9 100644 --- a/lib/Packages/DoFilelist.pm +++ b/lib/Packages/DoFilelist.pm @@ -13,10 +13,10 @@ use Exporter; use Deb::Versions; use Packages::Config qw( $DBDIR $ROOT @SUITES @ARCHIVES @SECTIONS @ARCHITECTURES %FTP_SITES ); +use Packages::I18N::Locale; use Packages::CGI; use Packages::DB; use Packages::Search qw( :all ); -use Packages::HTML; use Packages::Page (); use Packages::SrcPage (); @@ -24,48 +24,43 @@ our @ISA = qw( Exporter ); our @EXPORT = qw( do_filelist ); sub do_filelist { - my ($params, $opts, $html_header, $menu, $page_content) = @_; + my ($params, $opts, $page_content) = @_; if ($params->{errors}{package}) { - fatal_error( "package not valid or not specified" ); + fatal_error( _g( "package not valid or not specified" ) ); } if ($params->{errors}{suite}) { - fatal_error( "suite not valid or not specified" ); + fatal_error( _g( "suite not valid or not specified" ) ); } if ($params->{errors}{arch}) { - fatal_error( "arch not valid or not specified" ); + fatal_error( _g( "architecture not valid or not specified" ) ); } - $$menu = ''; my $pkg = $opts->{package}; my $suite = $opts->{suite}[0]; my $arch = $opts->{arch}[0] ||''; - - %$html_header = ( title => "Filelist of package $pkg in $suite of arch $arch", - title_tag => "Filelist of of package $pkg/$suite/$arch", - lang => 'en', - keywords => "debian, $suite, $arch, filelist", - print_title => 1, - ); + $page_content->{pkg} = $pkg; + $page_content->{suite} = $suite; + $page_content->{arch} = $arch; unless (@Packages::CGI::fatal_errors) { if (tie my %contents, 'DB_File', "$DBDIR/contents/filelists_${suite}_${arch}.db", O_RDONLY, 0666, $DB_BTREE) { unless (exists $contents{$pkg}) { - fatal_error( "No such package in this suite on this arch" ); + fatal_error( _g( "No such package in this suite on this architecture." ) ); } else { my @files = unpack "L/(CC/a)", $contents{$pkg}; - my $file = ""; - $$page_content .= '
';
+		my $file = '';
+
+		$page_content->{files} = [];
 		for (my $i=0; $i{files}}, "/$file";
 		}
-		$$page_content .= "
"; } } else { - fatal_error( "Invalid suite/arch combination" ); + fatal_error( _g( "Invalid suite/architecture combination" ) ); } } }