]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/poll.pm
* Add support for links of the form [../foo]], this links to the page
[git.ikiwiki.info.git] / IkiWiki / Plugin / poll.pm
index 56034b60ad766654c599849c16c965e93f7162d8..c040deb7622cbaa71cc9ecb6f2427aa28e3832fa 100644 (file)
@@ -45,7 +45,8 @@ sub preprocess (@) { #{{{
        my $ret="";
        foreach my $choice (@choices) {
                if ($open && exists $config{cgiurl}) {
-                       $ret.="<form action=\"$config{cgiurl}\">\n";
+                       # use POST to avoid robots
+                       $ret.="<form method=\"POST\" action=\"$config{cgiurl}\">\n";
                }
                my $percent=$total > 0 ? int($choices{$choice} / $total * 100) : 0;
                $ret.="<p>\n";
@@ -126,7 +127,7 @@ sub cgi ($) { #{{{
                if ($config{rcs}) {
                        # prevent deadlock with post-commit hook
                        IkiWiki::unlockwiki();
-                       IkiWiki::rcs_commit($pagesources{$page}, "poll vote",
+                       IkiWiki::rcs_commit($pagesources{$page}, "poll vote ($choice)",
                                IkiWiki::rcs_prepedit($pagesources{$page}),
                                $session->param("name"), $ENV{REMOTE_ADDR});
                }