]> scripts.mit.edu Git - www/ikiwiki.git/blobdiff - IkiWiki/Plugin/po.pm
only pass named parameters to the canremove hook
[www/ikiwiki.git] / IkiWiki / Plugin / po.pm
index b579d1f0831a4934017af66fc2079e772cf3b010..363720e1dfefc55230c6bda250256172ed58e8ca 100644 (file)
@@ -442,10 +442,10 @@ sub checkcontent (@) {
        return undef;
 }
 
-sub canremove ($$$) {
-       my ($page, $cgi, $session) = (shift, shift, shift);
+sub canremove (@) {
+       my %params = @_;
 
-       if (istranslation($page)) {
+       if (istranslation($params{page})) {
                return gettext("Can not remove a translation. Removing the master page, ".
                               "though, removes its translations as well.");
        }