]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2000-10-02 00:31:28 by ajt]
authorajt <>
Mon, 2 Oct 2000 07:31:28 +0000 (23:31 -0800)
committerajt <>
Mon, 2 Oct 2000 07:31:28 +0000 (23:31 -0800)
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
cgi/common.pl

index 62c5640f9412c5417d741ff3a2a5c6f5d8396e5b..6a699f962b5571ce9f82807558b946f84df6f5b9 100755 (executable)
@@ -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".
             '<A href="http://'.$debbugs::gWebDomain.'/db/ma/l'.&maintencoded($tmaint).'.html">'.&sani($tmaint).'</A>.';
 
-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 = <L>) {
                                if $normstate eq 'go' || $normstate eq 'go-nox';
 
                        if ($normstate eq 'html') {
-                               $this .= "  <em><A href=\"" . bugurl($ref, $archive, "msg=$xmessage") . "\">Full text</A> available.</em>";
+                               $this .= "  <em><A href=\"" . bugurl($ref, "msg=$xmessage") . "\">Full text</A> available.</em>";
                        }
 
                        my $show = 1;
index a5b728c9b909b0746de1d926f3290bec3705375b..65c8ad7a63535033c3965cc4067f6ad0cd099731 100644 (file)
@@ -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(<I>) { 
         $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(<MM>) {
-       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);