]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/poll.pm
progress: Display an error if the progress cannot be parsed, and allow the percent...
[git.ikiwiki.info.git] / IkiWiki / Plugin / poll.pm
index 32cb5c48f2ca8156c44a60ff5f1daa2852ffc759..35717c85ff065511925712f6cd6b2482798cf659 100644 (file)
@@ -7,15 +7,24 @@ use IkiWiki 2.00;
 use Encode;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "poll", call => \&getsetup);
        hook(type => "preprocess", id => "poll", call => \&preprocess);
        hook(type => "sessioncgi", id => "poll", call => \&sessioncgi);
 } # }}}
 
+sub getsetup () { #{{{
+       return 
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 my %pagenum;
 sub preprocess (@) { #{{{
        my %params=(open => "yes", total => "yes", percent => "yes", @_);
 
-       my $open=IkiWIki::yesno($params{open});
+       my $open=IkiWiki::yesno($params{open});
        my $showtotal=IkiWiki::yesno($params{total});
        my $showpercent=IkiWiki::yesno($params{percent});
        $pagenum{$params{page}}++;