]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/rename.pm
only pass named parameters to the canrename hook
[git.ikiwiki.info.git] / IkiWiki / Plugin / rename.pm
index f793495612c2d360dd2df480c33913f0ad801b7b..b43c5282ab0dd841da52017c1a456fc573c052a3 100644 (file)
@@ -91,8 +91,9 @@ sub check_canrename ($$$$$$) {
        my $canrename;
        IkiWiki::run_hooks(canrename => sub {
                return if defined $canrename;
        my $canrename;
        IkiWiki::run_hooks(canrename => sub {
                return if defined $canrename;
-               my $ret=shift->($q, $session, src => $src, srcfile => $srcfile,
-                               dest => $dest, destfile => $destfile);
+               my $ret=shift->(cgi => $q, session => $session,
+                       src => $src, srcfile => $srcfile,
+                       dest => $dest, destfile => $destfile);
                if (defined $ret) {
                        if ($ret eq "") {
                                $canrename=1;
                if (defined $ret) {
                        if ($ret eq "") {
                                $canrename=1;
@@ -107,7 +108,6 @@ sub check_canrename ($$$$$$) {
                        }
                }
        });
                        }
                }
        });
-       return $canrename;
 }
 
 sub rename_form ($$$) {
 }
 
 sub rename_form ($$$) {