]> sipb.mit.edu Git - ikiwiki.git/commitdiff
po: register a (dummy) cansave hook
authorintrigeri <intrigeri@boum.org>
Thu, 1 Jan 2009 18:48:48 +0000 (19:48 +0100)
committerintrigeri <intrigeri@boum.org>
Thu, 1 Jan 2009 18:48:48 +0000 (19:48 +0100)
Signed-off-by: intrigeri <intrigeri@boum.org>
IkiWiki/Plugin/po.pm

index c0c7557e461e9dba79b955d18c4c2c2d8046c310..e16b9f6c29aff58a65e6e6cd717128fa2025fc3a 100644 (file)
@@ -39,6 +39,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 => "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 => "canremove", id => "po", call => \&canremove);
        hook(type => "canrename", id => "po", call => \&canrename);
        hook(type => "editcontent", id => "po", call => \&editcontent);
        hook(type => "canremove", id => "po", call => \&canremove);
        hook(type => "canrename", id => "po", call => \&canrename);
        hook(type => "editcontent", id => "po", call => \&editcontent);
@@ -422,6 +423,12 @@ sub change(@) {
        }
 }
 
        }
 }
 
+sub cansave ($$$$) {
+       my ($page, $content, $cgi, $session) = (shift, shift, shift, shift);
+
+       debug("po plugin running in cansave")
+}
+
 sub canremove ($$$) {
        my ($page, $cgi, $session) = (shift, shift, shift);
 
 sub canremove ($$$) {
        my ($page, $cgi, $session) = (shift, shift, shift);