X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=cgi-bin%2Fdispatcher.pl;h=5ff3b675227236154e65da31e9ce4d510fcd016b;hb=202eb3b349348d04e15926777d7a3b7f8526c557;hp=254f0b6da3bdf116931f55dd2e3f5f12b1e4ccd2;hpb=45accc2589d257988a2f9481eb1702e50d1fbc23;p=deb%2Fpackages.git diff --git a/cgi-bin/dispatcher.pl b/cgi-bin/dispatcher.pl index 254f0b6..5ff3b67 100755 --- a/cgi-bin/dispatcher.pl +++ b/cgi-bin/dispatcher.pl @@ -33,6 +33,7 @@ use Packages::DoSearch; use Packages::DoSearchContents; use Packages::DoShow; use Packages::DoIndex; +use Packages::DoNewPkg; use Packages::DoDownload; use Packages::DoFilelist; @@ -64,7 +65,7 @@ $Packages::CGI::debug = $debug; my $acc = I18N::AcceptLanguage->new(); my $http_lang = $acc->accepts( $input->http("Accept-Language"), - \@LANGUAGES ); + \@LANGUAGES ) || 'en'; debug( "LANGUAGES=@LANGUAGES header=". $input->http("Accept-Language"). " http_lang=$http_lang", 2 ) if DEBUG; @@ -96,7 +97,7 @@ if (my $path = $input->path_info() || $input->param('PATH_INFO')) { } else { for ($components[-1]) { - /^(index|changelog|copyright|download|filelist)$/ && do { + /^(index|allpackages|newpkg|changelog|copyright|download|filelist)$/ && do { pop @components; $what_to_do = $1; last; @@ -171,7 +172,7 @@ my %params_def = ( keywords => { default => undef, match => '^([\w-]+)$', array => ',', var => \@archives, replace => { all => \@ARCHIVES, - default => [qw(us security non-US)]} }, + default => \@ARCHIVES} }, exact => { default => 0, match => '^(\w+)$', }, lang => { default => $http_lang, match => '^(\w+)$', }, source => { default => 0, match => '^(\d+)$', }, @@ -186,6 +187,8 @@ my %params_def = ( keywords => { default => undef, arch => { default => 'any', match => '^([\w-]+)$', array => ',', var => \@archs, replace => { any => \@ARCHITECTURES } }, + format => { default => 'html', match => '^(\w+)$', }, + mode => { default => undef, match => '^(\w+)$', }, ); my %opts; my %params = Packages::Search::parse_params( $input, \%params_def, \%opts );