X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/10a45c8f435f1280226d5dce45a238ced04cd476..07a1796d3bf52bca9a325cf517f742ff44b49921:/IkiWiki/Plugin/poll.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/poll.pm b/IkiWiki/Plugin/poll.pm index 34c9e8a9f..63c93c62d 100644 --- a/IkiWiki/Plugin/poll.pm +++ b/IkiWiki/Plugin/poll.pm @@ -3,8 +3,7 @@ package IkiWiki::Plugin::poll; use warnings; use strict; -use IkiWiki; -use URI; +use IkiWiki 2.00; 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.="