]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/rename.pm
po: register a (dummy) cansave hook
[git.ikiwiki.info.git] / IkiWiki / Plugin / rename.pm
index 740ca8ac443f72ba05336599da5a331d1157f55e..82639a073349f8f2ef1d5943df11b653a2f88a9a 100644 (file)
@@ -91,7 +91,8 @@ sub check_canrename ($$$$$$) {
        my $canrename;
        IkiWiki::run_hooks(canrename => sub {
                return if defined $canrename;
-               my $ret=shift->($src, $q, $session);
+               my $ret=shift->($q, $session, src => $src, srcfile => $srcfile,
+                               dest => $dest, destfile => $destfile);
                if (defined $ret) {
                        if ($ret eq "") {
                                $canrename=1;
@@ -311,7 +312,7 @@ sub sessioncgi ($$) {
                                required => 1,
                        };
 
-                       IkiWiki::run_hooks(rename => sub { shift->(\@torename); });
+                       IkiWiki::run_hooks(rename => sub { shift->(\@torename, $q, $session); });
 
                        # See if any subpages need to be renamed.
                        if ($q->param("subpages") && $src ne $dest) {