- }
- if ($needfix) {
- my $file=$pagesources{$page};
- my $oldcontent=readfile($config{srcdir}."/".$file);
- my $content=renamepage_hook($page, $src, $dest, $oldcontent);
- if ($oldcontent ne $content) {
- my $token=IkiWiki::rcs_prepedit($file);
- eval { writefile($file, $config{srcdir}, $content) };
- next if $@;
- my $conflict=IkiWiki::rcs_commit(
- $file,
- sprintf(gettext("update for rename of %s to %s"), $src, $dest),
- $token,
- $session->param("name"),
- $ENV{REMOTE_ADDR}
- );
- push @fixedlinks, $page if ! defined $conflict;
+ if ($needfix) {
+ my $file=$pagesources{$page};
+ my $oldcontent=readfile($config{srcdir}."/".$file);
+ my $content=renamepage_hook($page, $src, $dest, $oldcontent);
+ if ($oldcontent ne $content) {
+ my $token=IkiWiki::rcs_prepedit($file);
+ eval { writefile($file, $config{srcdir}, $content) };
+ next if $@;
+ my $conflict=IkiWiki::rcs_commit(
+ $file,
+ sprintf(gettext("update for rename of %s to %s"), $srcfile, $destfile),
+ $token,
+ $session->param("name"),
+ $ENV{REMOTE_ADDR}
+ );
+ push @fixedlinks, $page if ! defined $conflict;
+ }