X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/df82b5e62a1066752d9260728485772dbafae8c5..66bc27b485e6dd167d0394db18a078d5b7977ae3:/IkiWiki/Plugin/po.pm diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 0a970284c..daac95eb1 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -49,7 +49,7 @@ sub import { hook(type => "rename", id => "po", call => \&renamepages, first => 1); hook(type => "delete", id => "po", call => \&mydelete); hook(type => "change", id => "po", call => \&change); - hook(type => "cansave", id => "po", call => \&cansave); + hook(type => "checkcontent", id => "po", call => \&checkcontent); hook(type => "canremove", id => "po", call => \&canremove); hook(type => "canrename", id => "po", call => \&canrename); hook(type => "editcontent", id => "po", call => \&editcontent); @@ -436,11 +436,11 @@ sub change(@) { } } -sub cansave ($$$$) { - my ($page, $content, $cgi, $session) = (shift, shift, shift, shift); +sub checkcontent (@) { + my %params=@_; - if (istranslation($page)) { - my $res = isvalidpo($content); + if (istranslation($params{page})) { + my $res = isvalidpo($params{content}); if ($res) { return undef; }