From 025d9a063e021307f65ac0057f32b3e9b5a6de07 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 17 Nov 2006 23:46:02 -0800 Subject: [PATCH] * Fix typo in archive/archived url specification * Move to using Debbugs::Config in pkgreport.cgi, including the text urls * Remove the errorlib require line that was commented out --- cgi/pkgreport.cgi | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index 6f9e10de..4ae9efbf 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -3,14 +3,11 @@ package debbugs; use strict; -use POSIX qw(strftime tzset nice); +use POSIX qw(strftime nice); -#require '/usr/lib/debbugs/errorlib'; require './common.pl'; -require '/etc/debbugs/config'; -require '/etc/debbugs/text'; - +use Debbugs::Config qw(:globals :text); use Debbugs::User; use Debbugs::CGI qw(version_url); @@ -91,10 +88,10 @@ my %cats = ( } ], "severity" => [ { "nam" => "Severity", - "pri" => [map { "severity=$_" } @debbugs::gSeverityList], - "ttl" => [map { $debbugs::gSeverityDisplay{$_} } @debbugs::gSeverityList], + "pri" => [map { "severity=$_" } @gSeverityList], + "ttl" => [map { $gSeverityDisplay{$_} } @gSeverityList], "def" => "Unknown Severity", - "ord" => [0..@debbugs::gSeverityList], + "ord" => [0..@gSeverityList], } ], "classification" => [ { "nam" => "Classification", @@ -374,12 +371,12 @@ print "Content-Type: text/html; charset=utf-8\n\n"; print "\n"; print "\n" . - "$debbugs::gProject$Archived $debbugs::gBug report logs: $title\n" . - '' . + "$gProject$Archived $gBug report logs: $title\n" . + qq() . "\n" . '' . "\n"; -print "

" . "$debbugs::gProject$Archived $debbugs::gBug report logs: $title" . +print "

" . "$gProject$Archived $gBug report logs: $title" . "

\n"; my $showresult = 1; @@ -424,12 +421,12 @@ if (defined $pkg || defined $src) { if ($pkg and defined($pseudodesc) and exists($pseudodesc->{$pkg})) { push @references, "to the list of other pseudo-packages"; } else { - if ($pkg and defined $debbugs::gPackagePages) { + if ($pkg and defined $gPackagePages) { push @references, sprintf "to the %s package page", urlsanit("http://${debbugs::gPackagePages}/$pkg"), htmlsanit("$pkg"); } - if (defined $debbugs::gSubscriptionDomain) { + if (defined $gSubscriptionDomain) { my $ptslink = $pkg ? $srcforpkg : $src; - push @references, "to the Package Tracking System"; + push @references, "to the Package Tracking System"; } # Only output this if the source listing is non-trivial. if ($pkg and $srcforpkg and (@pkgs or $pkg ne $srcforpkg)) { @@ -465,10 +462,10 @@ if (defined $pkg || defined $src) { set_option("archive", !$archive); printf "

See the %s reports

", urlsanit('pkgreport.cgi?'.join(';', - (map {$_ eq 'archived'?():("$_=$param{$_}") + (map {$_ eq 'archive'?():("$_=$param{$_}") } keys %param ), - ('archived='.($archive?"no":"yes")) + ('archive='.($archive?"no":"yes")) ) ), ($archive ? "active" : "archived"); set_option("archive", $archive); @@ -647,7 +644,7 @@ sub pkg_htmlindexentrystatus { if (length($status{done})) { $result .= "
Done: " . htmlsanit($status{done}); # Disabled until archiving actually works again -# $days = ceil($debbugs::gRemoveAge - -M buglog($status{id})); +# $days = ceil($gRemoveAge - -M buglog($status{id})); # if ($days >= 0) { # $result .= ";\nWill be archived" . ( $days == 0 ? " today" : $days == 1 ? " in $days day" : " in $days days" ) . ""; # } else { @@ -701,7 +698,7 @@ sub pkg_htmlizebugs { my $header = ''; my $footer = "

Summary

\n"; - my @dummy = ($debbugs::gRemoveAge); #, @debbugs::gSeverityList, @debbugs::gSeverityDisplay); #, $debbugs::gHTMLExpireNote); + my @dummy = ($gRemoveAge); #, @gSeverityList, @gSeverityDisplay); #, $gHTMLExpireNote); if (@bugs == 0) { return "

No reports found!

\n"; -- 2.39.5