use warnings;
use POSIX;
-use URI::Escape;
-use HTML::Entities;
use DB_File;
-use Benchmark ':hireswallclock';
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 );
sub do_filelist {
my ($params, $opts, $page_content) = @_;
+ my $cat = $opts->{cat};
if ($params->{errors}{package}) {
- fatal_error( _g( "package not valid or not specified" ) );
+ fatal_error( $cat->g( "package not valid or not specified" ) );
}
if ($params->{errors}{suite}) {
- fatal_error( _g( "suite not valid or not specified" ) );
+ fatal_error( $cat->g( "suite not valid or not specified" ) );
}
if ($params->{errors}{arch}) {
- fatal_error( _g( "architecture not valid or not specified" ) );
+ fatal_error( $cat->g( "architecture not valid or not specified" ) );
}
my $pkg = $opts->{package};
O_RDONLY, 0666, $DB_BTREE) {
unless (exists $contents{$pkg}) {
- fatal_error( _g( "No such package in this suite on this architecture." ) );
+ fatal_error( $cat->g( "No such package in this suite on this architecture." ) );
} else {
my @files = unpack "L/(CC/a)", $contents{$pkg};
- my $file;
+ my $file = '';
$page_content->{files} = [];
for (my $i=0; $i<scalar @files;) {
}
}
} else {
- fatal_error( _g( "Invalid suite/architecture combination" ) );
+ fatal_error( $cat->g( "Invalid suite/architecture combination" ) );
}
}
}