if (my $path = $input->path_info() || $input->param('PATH_INFO')) {
my @components = grep { $_ } map { lc $_ } split /\/+/, $path;
- push @components, 'index' if $path =~ m,/$,;
+ push @components, 'index' if @components && $path =~ m,/$,;
my %LANGUAGES = map { $_ => 1 } @LANGUAGES;
if (@components > 0 and $LANGUAGES{$components[0]}) {
if DEBUG;
my $trailer = Packages::HTML::trailer( $ROOT );
-$trailer =~ s/LAST_MODIFIED_DATE/gmtime()/e; #FIXME
print $trailer;
# vim: ts=8 sw=4
my $arch = $opts->{arch}[0] ||'';
%$html_header = ( title => sprintf( _g( "Filelist of package <em>%s</em> in <em>%s</em> of architecture <em>%s</em>" ), $pkg, $suite, $arch ),
- title_tag => sprintf( _g( "Filelist of of package %s/%s/%s" ), $pkg, $suite, $arch ),
+ title_tag => sprintf( _g( "Filelist of package %s/%s/%s" ), $pkg, $suite, $arch ),
lang => $opts->{lang},
keywords => "debian, $suite, $arch, filelist",
print_title => 1,
if ($params->{errors}{keywords}) {
fatal_error( _g( "keyword not valid or missing" ) );
+ $opts->{keywords} = [];
} elsif (grep { length($_) < 2 } @{$opts->{keywords}}) {
fatal_error( _g( "keyword too short (keywords need to have at least two characters)" ) );
}
if ($params->{errors}{keywords}) {
fatal_error( _g( "keyword not valid or missing" ) );
+ $opts->{keywords} = [];
} elsif (grep { length($_) < 2 } @{$opts->{keywords}}) {
fatal_error( _g( "keyword too short (keywords need to have at least two characters)" ) );
}
unless (@results || @non_results ) {
fatal_error( _g( "No such package." )."<br>".
- sprintf( _g( '<a href="%s">Search for the package</a>' ), "$SEARCH_URL/$pkg" ) );
+ sprintf( _g( '<a href="%s">Search for the package</a>' ), make_search_url('','keywords='.uri_escape($pkg)) ) );
} else {
my %all_suites;
foreach (@results, @non_results) {
my ( $suite, $name, $info, $desc ) = @_;
my ($link, $post_link) = ('', '');
if ($suite) {
- $link = "<a href=\"".make_url($name,'',{suite=>$suite})."\">";
+ $link = "<a href=\"".make_url($name,'',{suite=>$suite,source=>undef})."\">";
$post_link = '</a>';
}
if ($info) {
my $short_desc = $also ? _g("also a virtual package provided by ")
: _g("virtual package provided by ");
if (@provided_by < 10) {
- $short_desc .= join( ', ',map { "<a href=\"".make_url($_,'',{suite=>$suite})."\">$_</a>" } @provided_by);
+ $short_desc .= join( ', ',map { "<a href=\"".make_url($_,'',{suite=>$suite,source=>undef})."\">$_</a>" } @provided_by);
} else {
$short_desc .= sprintf( _g("%s packages"), scalar(@provided_by));
}
"<div id=\"fineprint\" class=\"bordertop\"><p>".
sprintf( _g( "To report a problem with the web site, e-mail <a href=\"mailto:%s\">%s</a>. For other contact information, see the Debian <a href=\"%s/contact\">contact page</a>." ), $CONTACT_MAIL, $CONTACT_MAIL, $HOME).
"</p>\n".
- "<p>". _g( "Last Modified: " ). "LAST_MODIFIED_DATE".
+ "<p>". _g( "Last Modified: " ). gmtime().
"<br>\n".
sprintf( _g( "Copyright © 1997-2005 <a href=\"http://www.spi-inc.org\">SPI</a>; See <a href=\"%s/license\">license terms</a>." ), "$HOME/" )."<br>\n".
_g( "Debian is a registered trademark of Software in the Public Interest, Inc." ).