diff options
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/po.pm | 6 | ||||
-rw-r--r-- | IkiWiki/Plugin/remove.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/skeleton.pm.example | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index b579d1f08..363720e1d 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -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."); } diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm index 3f1704846..cbc8a0f2c 100644 --- a/IkiWiki/Plugin/remove.pm +++ b/IkiWiki/Plugin/remove.pm @@ -58,7 +58,7 @@ sub check_canremove ($$$) { my $canremove; IkiWiki::run_hooks(canremove => sub { return if defined $canremove; - my $ret=shift->($page, $q, $session); + my $ret=shift->(page => $page, cgi => $q, session => $session); if (defined $ret) { if ($ret eq "") { $canremove=1; diff --git a/IkiWiki/Plugin/skeleton.pm.example b/IkiWiki/Plugin/skeleton.pm.example index ec5a0c725..6a97fb2f2 100644 --- a/IkiWiki/Plugin/skeleton.pm.example +++ b/IkiWiki/Plugin/skeleton.pm.example @@ -183,10 +183,8 @@ sub canedit ($$$) { debug("skeleton plugin running in canedit"); } -sub canremove ($$$) { - my $page=shift; - my $cgi=shift; - my $session=shift; +sub canremove (@) { + my %params=@_; debug("skeleton plugin running in canremove"); } |