From caaf9128dd0e5c91ae54e2b654d1c8fbafbf7bb6 Mon Sep 17 00:00:00 2001 From: ajt <> Date: Sun, 1 Oct 2000 23:31:28 -0800 Subject: [PATCH] [project @ 2000-10-02 00:31:28 by ajt] Correct some precedence: open foo || quit should be open foo or quit. Make bugreport.cgi give a slightly better error when it can't find a bug page. Still doesn't give a link to the archive/non-archive page though. --- cgi/bugreport.cgi | 8 ++++---- cgi/common.pl | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 62c5640f..6a699f96 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -26,7 +26,7 @@ my $reverse = (param('reverse') || 'no') eq 'yes'; set_option("archive", $archive); -my %status = getbugstatus($ref); +my %status = getbugstatus($ref) or &quit("Couldn't get bug status: $!"); my $indexentry; my $descriptivehead; @@ -90,8 +90,8 @@ $tmaint = defined($maintainer{$tpack}) ? $maintainer{$tpack} : '(unknown)'; $descriptivehead= $indexentry.$submitted.";\nMaintainer for $status{package} is\n". ''.&sani($tmaint).'.'; -my $buglog = buglog($ref, $archive); -open L, "<$buglog" || &quit("open log for $ref: $!"); +my $buglog = buglog($ref); +open L, "<$buglog" or &quit("open log for $ref: $!"); my $log=''; @@ -141,7 +141,7 @@ while(my $line = ) { if $normstate eq 'go' || $normstate eq 'go-nox'; if ($normstate eq 'html') { - $this .= " Full text available."; + $this .= " Full text available."; } my $show = 1; diff --git a/cgi/common.pl b/cgi/common.pl index a5b728c9..65c8ad7a 100644 --- a/cgi/common.pl +++ b/cgi/common.pl @@ -143,7 +143,7 @@ sub packageurl { sub allbugs { my @bugs = (); - opendir(D, "$debbugs::gSpoolDir/db") || &quit("opendir db: $!"); + opendir(D, "$debbugs::gSpoolDir/db") or &quit("opendir db: $!"); @bugs = sort {$a<=>$b} grep s/\.status$//, (grep m/^[0-9]+\.status$/, (readdir(D))); @@ -220,9 +220,9 @@ sub getbugs { my $bugfunc = shift; if ( $common_archive ) { - open I, "<$debbugs::gSpoolDir/index.archive" || &quit("bugindex: $!"); + open I, "<$debbugs::gSpoolDir/index.archive" or &quit("bugindex: $!"); } else { - open I, "<$debbugs::gSpoolDir/index.db" || &quit("bugindex: $!"); + open I, "<$debbugs::gSpoolDir/index.db" or &quit("bugindex: $!"); } my @result = (); @@ -243,9 +243,9 @@ sub getbugs { sub pkgbugsindex { my %descstr = (); if ( $common_archive ) { - open I, "<$debbugs::gSpoolDir/index.archive" || &quit("bugindex: $!"); + open I, "<$debbugs::gSpoolDir/index.archive" or &quit("bugindex: $!"); } else { - open I, "<$debbugs::gSpoolDir/index.db" || &quit("bugindex: $!"); + open I, "<$debbugs::gSpoolDir/index.db" or &quit("bugindex: $!"); } while() { $descstr{ $1 } = 1 if (m/^(\S+)/); @@ -274,9 +274,9 @@ sub maintencoded { sub getmaintainers { my %maintainer; - open(MM,"$gMaintainerFile") || &quit("open $gMaintainerFile: $!"); + open(MM,"$gMaintainerFile") or &quit("open $gMaintainerFile: $!"); while() { - m/^(\S+)\s+(\S.*\S)\s*$/ || &quit("$gMaintainerFile: \`$_'"); + m/^(\S+)\s+(\S.*\S)\s*$/ or &quit("$gMaintainerFile: \`$_'"); ($a,$b)=($1,$2); $a =~ y/A-Z/a-z/; $maintainer{$a}= $b; @@ -293,9 +293,9 @@ sub getbugstatus { if ( $common_archive ) { my $archdir = sprintf "%02d", $bugnum % 100; - open(S,"$gSpoolDir/archive/$archdir/$bugnum.status" ) || return undef; + open(S,"$gSpoolDir/archive/$archdir/$bugnum.status" ) or return (); } else { - open(S,"$gSpoolDir/db/$bugnum.status") || return undef; + open(S,"$gSpoolDir/db/$bugnum.status") or return (); } my @lines = qw(originator date subject msgid package keywords done forwarded mergedwith severity); -- 2.39.5