- my $now_time = strftime ("%B %d, %Y", @date);
- my $rss_time = strftime ("%Y-%m-%dT%H:%M+00:00", @date);
-
- unless ($opts->{format} eq 'rss') {
- my $title = sprintf( _g( "New Packages in \"%s\"" ),
- $suite );
- %$html_header = ( title => $title,
- title_keywords => "debian, "._g('new packages').", $suite, @{$opts->{section}}",
- meta => "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"newpkg?format=rss\">",
- lang => $opts->{lang},
- print_title => 1 );
-
- $$page_content .= "<p>"
- . sprintf(_g( "The following packages were added to suite <em>%s</em>%s in the Debian archive during the last 7 days."), $suite,
- $one_section ? sprintf(_g(" (section %s)"),$one_section):'')."</p>"
- . "<p>".sprintf( _g( "This information is also available as an <a href=\"%s\">RSS feed</a>." ), "newpkg?format=rss" )
- ." <a href=\"newpkg?format=rss\"><img src=\"http://planet.debian.org/rss10.png\" alt=\"[RSS 1.0 Feed]\"></a></p>";
-
- if (@new_pkgs) {
- $$page_content .= "\n<ul>\n";
-
- foreach my $pkg (sort { &$sort_func($a,$b) } @new_pkgs) {
- $$page_content .= sprintf ("<li><a href=\"%s\">%s</a>\n -- %s%s",
- $pkg->[0], $pkg->[0],
- encode_entities($pkg->[-1], '"&<>'),
- $pkg->[1] ?
- sprintf(_g(" <em>(%s days old)</em>"),$pkg->[1]):
- '');
- }
- $$page_content .= "\n</ul>\n" if @new_pkgs;
- }
-
- my $slist = '';
- if ($one_section) {
- foreach my $s (@SECTIONS) {
- $slist .= ", " if $slist;
- $slist .= $one_section eq $s ? $s :
- "<a href=\"../$s/newpkg\">$s</a>";
- }
- }