]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Rcs/tla.pm
* prettydate,ddate: Don't ignore time formats passed to displaytime
[ikiwiki.git] / IkiWiki / Rcs / tla.pm
index be5ec0601304d1c66c12f366c40d794975cd47fd..15824ffaf71a6e465da23375c699323b819bf58a 100644 (file)
@@ -3,7 +3,6 @@
 use warnings;
 use strict;
 use IkiWiki;
-use POSIX qw(setlocale LC_CTYPE);
 
 package IkiWiki;
 
@@ -38,10 +37,19 @@ sub rcs_prepedit ($) { #{{{
        }
 } #}}}
 
-sub rcs_commit ($$$) { #{{{
+sub rcs_commit ($$$;$$) { #{{{
        my $file=shift;
        my $message=shift;
        my $rcstoken=shift;
+       my $user=shift;
+       my $ipaddr=shift;
+
+       if (defined $user) {
+               $message="web commit by $user".(length $message ? ": $message" : "");
+       }
+       elsif (defined $ipaddr) {
+               $message="web commit from $ipaddr".(length $message ? ": $message" : "");
+       }
 
        if (-d "$config{srcdir}/{arch}") {
                # Check to see if the page has been changed by someone
@@ -112,7 +120,7 @@ sub rcs_recentchanges ($) {
                        split(/ /, "$newfiles $modfiles .arch-ids/fake.id");
 
                my $sdate = $head->get("Standard-date");
-               my $when = time - str2time($sdate, 'UTC');
+               my $when = str2time($sdate, 'UTC');
 
                my $committype = "web";
                if (defined $summ && $summ =~ /$config{web_commit_regexp}/) {
@@ -137,7 +145,8 @@ sub rcs_recentchanges ($) {
                                diffurl => $diffurl,
                        } if length $file;
                }
-               push @ret, { rev => $change,
+               push @ret, {
+                       rev => $change,
                        user => $user,
                        committype => $committype,
                        when => $when,