summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/po.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/po.pm')
-rw-r--r--IkiWiki/Plugin/po.pm10
1 files changed, 5 insertions, 5 deletions
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;
}