X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/60ed2aa9e45f0652430483398bc39db1d09c6d38..65e726f201d7b9919271cfe7e8a7314a6abf0fc3:/IkiWiki/Plugin/rename.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm index 0da90a538..ad5e72645 100644 --- a/IkiWiki/Plugin/rename.pm +++ b/IkiWiki/Plugin/rename.pm @@ -108,6 +108,7 @@ sub check_canrename ($$$$$$) { } } }); + return defined $canrename ? $canrename : 1; } sub rename_form ($$$) { @@ -349,8 +350,9 @@ sub sessioncgi ($$) { $pagesources{$rename->{src}}=$rename->{destfile}; } IkiWiki::rcs_commit_staged( - sprintf(gettext("rename %s to %s"), $srcfile, $destfile), - $session->param("name"), $ENV{REMOTE_ADDR}) if $config{rcs}; + message => sprintf(gettext("rename %s to %s"), $srcfile, $destfile), + session => $session, + ) if $config{rcs}; # Then link fixups. foreach my $rename (@torename) { @@ -575,8 +577,8 @@ sub fixlinks ($$$) { $file, sprintf(gettext("update for rename of %s to %s"), $rename->{srcfile}, $rename->{destfile}), $token, - $session->param("name"), - $ENV{REMOTE_ADDR} + $session->param("name"), + $session->remote_addr(), ); push @fixedlinks, $page if ! defined $conflict; }