]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/poll.pm
po: inject our own (currently a no-op) nicepagetitle function
[git.ikiwiki.info.git] / IkiWiki / Plugin / poll.pm
index fadc1773e66a61758d0012991e32da66d5ae0209..5ac5b818de872e16ecd9470f77c2d6a6486cdd20 100644 (file)
@@ -6,22 +6,22 @@ use strict;
 use IkiWiki 2.00;
 use Encode;
 
-sub import { #{{{
+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 () { #{{{
+sub getsetup () {
        return 
                plugin => {
                        safe => 1,
                        rebuild => undef,
                },
-} #}}}
+}
 
 my %pagenum;
-sub preprocess (@) { #{{{
+sub preprocess (@) {
        my %params=(open => "yes", total => "yes", percent => "yes", @_);
 
        my $open=IkiWiki::yesno($params{open});
@@ -77,9 +77,9 @@ sub preprocess (@) { #{{{
                $ret.="<span>".gettext("Total votes:")." $total</span>\n";
        }
        return "<div class=poll>$ret</div>";
-} # }}}
+}
 
-sub sessioncgi ($$) { #{{{
+sub sessioncgi ($$) {
        my $cgi=shift;
        my $session=shift;
        if (defined $cgi->param('do') && $cgi->param('do') eq "poll") {
@@ -152,6 +152,6 @@ sub sessioncgi ($$) { #{{{
                        -url => urlto($page, undef, 1));
                exit;
        }
-} #}}}
+}
 
 1