]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Fix typo in Debbugs::Status
authorDon Armstrong <don@donarmstrong.com>
Thu, 14 Jun 2007 20:16:49 +0000 (21:16 +0100)
committerDon Armstrong <don@donarmstrong.com>
Thu, 14 Jun 2007 20:16:49 +0000 (21:16 +0100)
 * Allow guessing location from summary if passed
 * Don't show archived information for archived bugs

Debbugs/Status.pm
cgi/pkgreport.cgi

index 312beaca700a511ceee073480b32e5d9e46134f3..ae1d7a11d42c227b2dec016ac40bcfb01e175ef4 100644 (file)
@@ -160,8 +160,10 @@ sub read_bug{
         if not exists $param{bug} and not exists $param{summary};
     my $status;
     my $log;
+    my $location;
     if (not defined $param{summary}) {
-        my ($lref, $location) = @param{qw(bug location)};
+        my $lref;
+        ($lref,$location) = @param{qw(bug location)};
         if (not defined $location) {
              $location = getbuglocation($lref,'summary');
              return undef if not defined $location;
@@ -174,6 +176,7 @@ sub read_bug{
         $status = $param{summary};
         $log = $status;
         $log =~ s/\.summary$/.log/;
+        ($location) = $status =~ m/(db-h|db|archive)/;
     }
     my $status_fh = new IO::File $status, 'r' or
         warn "Unable to open $status for reading: $!" and return undef;
@@ -222,7 +225,7 @@ sub read_bug{
     }
     # Add log last modified time
     $data{log_modified} = (stat($log))[9];
-    $date{location} = $location;
+    $data{location} = $location;
 
     return \%data;
 }
index cca0aaf6c591d8bd1c2fef703598ff3347f7a1b7..5862dd1965d10acd01f1420aedccbfeff67fba78 100755 (executable)
@@ -644,7 +644,7 @@ sub pkg_htmlindexentrystatus {
                                   status => \%status,
                                   days_until => 1,
                                  );
-        if ($days >= 0 and $status->{location} ne 'archive') {
+        if ($days >= 0 and defined $status->{location} and $status->{location} ne 'archive') {
             $result .= ";\n<strong>Will be archived" . ( $days == 0 ? " today" : $days == 1 ? " in $days day" : " in $days days" ) . "</strong>";
         }
     }
@@ -920,7 +920,7 @@ sub pkg_htmlselectyesno {
 sub pkg_htmlselectsuite {
     my $id = sprintf "b_%d_%d_%d", $_[0], $_[1], $_[2];
     my @suites = ("stable", "testing", "unstable", "experimental");
-    my %suiteaka = ("stable", "sarge", "testing", "etch", "unstable", "sid");
+    my %suiteaka = ("stable", "etch", "testing", "lenny", "unstable", "sid");
     my $defaultsuite = "unstable";
 
     my $result = sprintf '<select name=dist id="%s">', $id;