]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Don't show time to archive for archived bugs
authorDon Armstrong <don@donarmstrong.com>
Thu, 14 Jun 2007 18:33:02 +0000 (19:33 +0100)
committerDon Armstrong <don@donarmstrong.com>
Thu, 14 Jun 2007 18:33:02 +0000 (19:33 +0100)
 * Handle summary being passed; guess log based on it.

Debbugs/Status.pm
cgi/pkgreport.cgi

index bda64abdeef4d9aeca2b0e6de1382ec116f56b73..312beaca700a511ceee073480b32e5d9e46134f3 100644 (file)
@@ -172,6 +172,8 @@ sub read_bug{
     }
     else {
         $status = $param{summary};
+        $log = $status;
+        $log =~ s/\.summary$/.log/;
     }
     my $status_fh = new IO::File $status, 'r' or
         warn "Unable to open $status for reading: $!" and return undef;
@@ -220,6 +222,7 @@ sub read_bug{
     }
     # Add log last modified time
     $data{log_modified} = (stat($log))[9];
+    $date{location} = $location;
 
     return \%data;
 }
index 87525d91ab3f22c3d57b967404313d6f4f0b849c..cca0aaf6c591d8bd1c2fef703598ff3347f7a1b7 100755 (executable)
@@ -644,7 +644,7 @@ sub pkg_htmlindexentrystatus {
                                   status => \%status,
                                   days_until => 1,
                                  );
-        if ($days >= 0) {
+        if ($days >= 0 and $status->{location} ne 'archive') {
             $result .= ";\n<strong>Will be archived" . ( $days == 0 ? " today" : $days == 1 ? " in $days day" : " in $days days" ) . "</strong>";
         }
     }