chiark / gitweb /
Show dates of DECISIONs
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 20 Apr 2010 17:10:24 +0000 (18:10 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 20 Apr 2010 17:10:24 +0000 (18:10 +0100)
webstump/scripts/filter.lib.pl
webstump/scripts/html_output.pl

index 700920da9912f470263da152820513ee29291ca6..8aef45fe54112f53e4d590f157fe4b000849951d 100644 (file)
@@ -17,6 +17,7 @@ sub process_approval_decision {
   my $ShortDirectoryName = pop( @_ );
   my $newsgroup = pop( @_ );
   my $Subject = pop( @_ );
+  my $now = time;
 
   my $address = $newsgroups_index{$newsgroup};
 
@@ -31,7 +32,7 @@ sub process_approval_decision {
   my $sanisubj= $Subject;
   $sanisubj =~ s/.*\:\://;
 
-print STDERR "DECISION: $newsgroup | $ShortDirectoryName | $decision | $cathow | $sanisubj\n";
+print STDERR "DECISION: $newsgroup | $ShortDirectoryName | $decision | $cathow | $now | $sanisubj\n";
 
   &rmdir_rf( &article_file_name( $ShortDirectoryName ) );
 
index d5c225ec81cd40aa71b23a487a5f3b3b86237c7f..1c5fd4d96145bec85bbcfd738b952e809b093f13 100644 (file)
@@ -703,14 +703,17 @@ and are often quoted in message headers in [square brackets].<p>
       my @vals = split / \| /, $';
       return 0 unless @vals >= 5;
       my $subj= pop @vals;
-      my ($group,$dir,$act,$reason) = @vals;
+      my ($group,$dir,$act,$reason,$timet) = @vals;
+      my $date= $timet ? (strftime "%Y-%M-%d %H:%M:%S GMT", gmtime $timet)
+          : "(unknown)";
       return 0 unless $group eq $request{'newsgroup'};
       return 0 unless $subj =~ m,/(\d+)$,;
       my $treqnum= $1;
       return 0 if defined($reqnum) and $treqnum ne $reqnum;
-      print "<table rules=all><tr><th>Reference<th>Disposal<th>Reason</tr>\n"
+      print "<table rules=all><tr><th>Date<th>Reference<th>Disposal<th>Reason</tr>\n"
           unless $sofar;
-      print "<tr>", (map { "<td>".escapeHTML($_) } $treqnum,$act,$reason);
+      print "<tr>", (map { "<td>".escapeHTML($_) }
+                     $date,$treqnum,$act,$reason);
       print "</tr>\n";
       return defined($reqnum) ? 2 : 1;
   });