]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/rename.pm
Merge remote branch 'smcv/ready/localurl'
[ikiwiki.git] / IkiWiki / Plugin / rename.pm
index 61d39d4b568d74b3766984f585862ae698b9957b..57747d3c9df00141a1ade61e823c453a2ecbcc33 100644 (file)
@@ -108,6 +108,7 @@ sub check_canrename ($$$$$$) {
                        }
                }
        });
                        }
                }
        });
+       return defined $canrename ? $canrename : 1;
 }
 
 sub rename_form ($$$) {
 }
 
 sub rename_form ($$$) {
@@ -125,7 +126,7 @@ sub rename_form ($$$) {
                method => 'POST',
                javascript => 0,
                params => $q,
                method => 'POST',
                javascript => 0,
                params => $q,
-               action => $config{cgiurl},
+               action => IkiWiki::cgiurl(),
                stylesheet => 1,
                fields => [qw{do page new_name attachment}],
        );
                stylesheet => 1,
                fields => [qw{do page new_name attachment}],
        );
@@ -573,11 +574,10 @@ sub fixlinks ($$$) {
                                eval { writefile($file, $config{srcdir}, $content) };
                                next if $@;
                                my $conflict=IkiWiki::rcs_commit(
                                eval { writefile($file, $config{srcdir}, $content) };
                                next if $@;
                                my $conflict=IkiWiki::rcs_commit(
-                                       $file,
-                                       sprintf(gettext("update for rename of %s to %s"), $rename->{srcfile}, $rename->{destfile}),
-                                       $token,
-                                       $session->param("name"),
-                                       $session->remote_addr(),
+                                       file => $file,
+                                       message => sprintf(gettext("update for rename of %s to %s"), $rename->{srcfile}, $rename->{destfile}),
+                                       token => $token,
+                                       session => $session,
                                );
                                push @fixedlinks, $page if ! defined $conflict;
                        }
                                );
                                push @fixedlinks, $page if ! defined $conflict;
                        }