X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/fc11e4ad8106ffe9e2e27aeae72055e1f371e755..8daaa11baa70e07f6405ccb4474e97cac9627961:/IkiWiki/Plugin/poll.pm?ds=inline diff --git a/IkiWiki/Plugin/poll.pm b/IkiWiki/Plugin/poll.pm index bca8f5d54..a3321a32e 100644 --- a/IkiWiki/Plugin/poll.pm +++ b/IkiWiki/Plugin/poll.pm @@ -4,7 +4,6 @@ package IkiWiki::Plugin::poll; use warnings; use strict; use IkiWiki; -use URI; sub import { #{{{ hook(type => "preprocess", id => "poll", call => \&preprocess); @@ -22,7 +21,7 @@ sub preprocess (@) { #{{{ my $open=yesno($params{open}); my $showtotal=yesno($params{total}); - my $percent=yesno($params{percent}); + my $showpercent=yesno($params{percent}); $pagenum{$params{page}}++; my %choices; @@ -45,27 +44,32 @@ sub preprocess (@) { #{{{ my $ret=""; foreach my $choice (@choices) { + if ($open && exists $config{cgiurl}) { + # use POST to avoid robots + $ret.="
\n"; } - $ret.="