X-Git-Url: https://git.deb.at/?a=blobdiff_plain;ds=inline;f=lib%2FPackages%2FDoNewPkg.pm;h=c9e0ca23f009f79615048c7d1a4519230667e2e7;hb=bedf14e393ba83316aca3e442c14f24914a6cd84;hp=c3175ec6db6ca2cbfd39a3c6573a91b51cf5e0dc;hpb=6b32484cb228479df13814cf1ba0f6667ff7148d;p=deb%2Fpackages.git diff --git a/lib/Packages/DoNewPkg.pm b/lib/Packages/DoNewPkg.pm index c3175ec..c9e0ca2 100644 --- a/lib/Packages/DoNewPkg.pm +++ b/lib/Packages/DoNewPkg.pm @@ -16,10 +16,10 @@ use Packages::I18N::Locale; use Packages::Search qw( :all ); use Packages::CGI; use Packages::DB; -use Packages::Config qw( $TOPDIR @SECTIONS $HOSTNAME $ROOT ); +use Packages::Config qw( $TOPDIR @SECTIONS $ROOT ); sub do_newpkg { - my ($params, $opts, $html_header, $menu, $page_content) = @_; + my ($params, $opts, $page_content) = @_; if ($params->{errors}{suite}) { fatal_error( _g( "suite not valid or not specified" ) ); @@ -38,10 +38,6 @@ sub do_newpkg { my $one_section = @{$opts->{section}} == 1 ? $opts->{section}[0] : undef; - my @full_path = ($HOSTNAME, $ROOT, $suite); - push @full_path, $one_archive if $one_archive; - my $full_path = join( '/', @full_path ); - my @new_pkgs; #FIXME: move to Packages::DB? open NEWPKG, '<', "$TOPDIR/files/packages/newpkg_info" @@ -60,91 +56,18 @@ sub do_newpkg { close NEWPKG; (my @date)= gmtime(); - 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 => "", - lang => $opts->{lang}, - print_title => 1 ); - - $$page_content .= "
" - . sprintf(_g( "The following packages were added to suite %s%s in the Debian archive during the last 7 days."), $suite, - $one_section ? sprintf(_g(" (section %s)"),$one_section):'')."
" - . "".sprintf( _g( "This information is also available as an RSS feed." ), "newpkg?format=rss" ) - ."
"; - - if (@new_pkgs) { - $$page_content .= "\n".
- _g( "All packages" ) ."
(".
- _g( "compact compressed textlist" ).")
".
- ($slist ? sprintf(_g( "New packages in %s" ), $slist ):'').
- "