X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/87f01dac2e1680b90e655c7bb663906b2be5de1c..331430fe9f092cd00db316a1b35c5fe8b42d036d:/IkiWiki/Plugin/rename.pm diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm index ad5e72645..e871b815d 100644 --- a/IkiWiki/Plugin/rename.pm +++ b/IkiWiki/Plugin/rename.pm @@ -126,7 +126,7 @@ sub rename_form ($$$) { method => 'POST', javascript => 0, params => $q, - action => $config{cgiurl}, + action => IkiWiki::cgiurl(), stylesheet => 1, fields => [qw{do page new_name attachment}], ); @@ -567,6 +567,7 @@ sub fixlinks ($$$) { } if ($needfix) { my $file=$pagesources{$page}; + next unless -e $config{srcdir}."/".$file; my $oldcontent=readfile($config{srcdir}."/".$file); my $content=renamepage_hook($page, $rename->{src}, $rename->{dest}, $oldcontent); if ($oldcontent ne $content) { @@ -574,11 +575,10 @@ sub fixlinks ($$$) { 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; }