]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/rename.pm
response
[git.ikiwiki.info.git] / IkiWiki / Plugin / rename.pm
index 0da90a538cb15b1e8f7b2b6a162a8f170ecb61bc..ad5e726458cedbbb63a069297372e3bb739fe486 100644 (file)
@@ -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;
                        }