]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/rename.pm
po: remove renamed pages special handling, not needed anymore
[git.ikiwiki.info.git] / IkiWiki / Plugin / rename.pm
index 2200235f6df40794592bc5bba9969b797b7e5fcc..227f59bfa45baf719e93cf8163f59659d74df004 100644 (file)
@@ -291,6 +291,8 @@ sub sessioncgi ($$) {
                                required => 1,
                        };
 
+                       IkiWiki::run_hooks(rename => sub { shift->(\@torename); });
+
                        # See if any subpages need to be renamed.
                        if ($q->param("subpages") && $src ne $dest) {
                                foreach my $p (keys %pagesources) {
@@ -338,16 +340,10 @@ sub sessioncgi ($$) {
                                sprintf(gettext("rename %s to %s"), $srcfile, $destfile),
                                $session->param("name"), $ENV{REMOTE_ADDR}) if $config{rcs};
 
+                       # Then link fixups.
                        foreach my $rename (@torename) {
                                next if $rename->{src} eq $rename->{dest};
                                next if $rename->{error};
-                               IkiWiki::run_hooks(rename => sub {
-                                       shift->(
-                                               oldpage => $src,
-                                               newpage => $dest,
-                                       );
-                               });
-                               # Then link fixups.
                                foreach my $p (fixlinks($rename, $session)) {
                                        # map old page names to new
                                        foreach my $r (@torename) {