]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2003-09-18 16:10:13 by cjwatson]
authorcjwatson <>
Thu, 18 Sep 2003 23:10:13 +0000 (15:10 -0800)
committercjwatson <>
Thu, 18 Sep 2003 23:10:13 +0000 (15:10 -0800)
Don't say things like "Will be archived: in -844 days" for already-archived
bugs.

cgi/common.pl

index 8afd98744e3b979e973e77d3ba48cbe194824858..d9da34df439e2e90eac2273cba8f9c1687fcf475 100644 (file)
@@ -317,7 +317,11 @@ sub htmlindexentrystatus {
     } elsif (length($status{done})) {
         $result .= ";\n<strong>Done:</strong> " . htmlsanit($status{done});
         $days = ceil($debbugs::gRemoveAge - -M buglog($status{id}));
-       $result .= ";\n<strong>Will be archived:</strong>" . ( $days == 0 ? " today" : $days == 1 ? " in $days day" : " in $days days" );
+        if ($days >= 0) {
+            $result .= ";\n<strong>Will be archived:</strong>" . ( $days == 0 ? " today" : $days == 1 ? " in $days day" : " in $days days" );
+        } else {
+            $result .= ";\n<strong>Archived</strong>";
+        }
     }
 
     unless (length($status{done})) {