X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/54f600af14bf6dc067ffc30ec6f22d517001fe99..554e7d5112845420e405b2c2f9129119d4bded49:/IkiWiki/Plugin/tla.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/tla.pm b/IkiWiki/Plugin/tla.pm index f5ad0cc96..da4385446 100644 --- a/IkiWiki/Plugin/tla.pm +++ b/IkiWiki/Plugin/tla.pm @@ -98,18 +98,23 @@ sub rcs_prepedit ($) { } } -sub rcs_commit ($$$;$$) { - my $file=shift; - my $message=shift; - my $rcstoken=shift; - my $user=shift; - my $ipaddr=shift; +sub rcs_commit (@) { + my %params=@_; - if (defined $user) { - $message="web commit by $user".(length $message ? ": $message" : ""); - } - elsif (defined $ipaddr) { - $message="web commit from $ipaddr".(length $message ? ": $message" : ""); + my ($file, $message, $rcstoken)= + ($params{file}, $params{message}, $params{token}); + + if (defined $params{session}) { + if (defined $params{session}->param("name")) { + $message="web commit by ". + $params{session}->param("name"). + (length $message ? ": $message" : ""); + } + elsif (defined $params{session}->remote_addr()) { + $message="web commit from ". + $params{session}->remote_addr(). + (length $message ? ": $message" : ""); + } } if (-d "$config{srcdir}/{arch}") { @@ -139,10 +144,10 @@ sub rcs_commit ($$$;$$) { return undef # success } -sub rcs_commit_staged ($$$) { +sub rcs_commit_staged (@) { # Commits all staged changes. Changes can be staged using rcs_add, # rcs_remove, and rcs_rename. - my ($message, $user, $ipaddr)=@_; + my %params=@_; error("rcs_commit_staged not implemented for tla"); # TODO }