]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
rename postvote to postlink
authorJoey Hess <joeyh@joeyh.name>
Mon, 26 Nov 2018 17:23:50 +0000 (13:23 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 26 Nov 2018 17:23:50 +0000 (13:23 -0400)
This better explains what it contains, which is a wikilink to the page
to go to after posting the vote. And postlink is more consistent a name
with posttrail.

CHANGELOG
IkiWiki/Plugin/poll.pm
doc/ikiwiki/directive/poll.mdwn

index 892dca041f1456e9ed0f54fb02521af31f217f92..cb7a7a038a77bd43e78176a04c5c7831a8966ebc 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -10,7 +10,7 @@ ikiwiki (3.20180312) UNRELEASED; urgency=medium
   [ Joey Hess ]
   * aggregate: Fix aggregation of posts without a title.
     Thanks, Alexandre Oliva
-  * poll: Added postvote and posttrail options for better multi-page polls.
+  * poll: Added postlink and posttrail options for better multi-page polls.
 
  -- Simon McVittie <smcv@debian.org>  Wed, 16 May 2018 13:09:27 +0100
 
index 734fe487e9065e2c2ad71d19549efd0ec0da002c..5a09e20879c46604350cd3f2e239c854ea594651 100644 (file)
@@ -69,8 +69,8 @@ sub preprocess (@) {
                        $ret.="<input type=\"hidden\" name=\"num\" value=\"$num\" />\n";
                        $ret.="<input type=\"hidden\" name=\"page\" value=\"$params{page}\" />\n";
                        $ret.="<input type=\"hidden\" name=\"choice\" value=\"$choice\" />\n";
-                       if (defined $params{postvote}) {
-                               $ret.="<input type=\"hidden\" name=\"postvote\" value=\"".linkpage($params{postvote})."\" />\n";
+                       if (defined $params{postlink}) {
+                               $ret.="<input type=\"hidden\" name=\"postlink\" value=\"".linkpage($params{postlink})."\" />\n";
                        }
                        if (defined $params{posttrail}) {
                                $ret.="<input type=\"hidden\" name=\"posttrail\" value=\"".linkpage($params{posttrail})."\" />\n";
@@ -119,8 +119,8 @@ sub sessioncgi ($$) {
                }
 
                my $postvote=urlto($page);
-               if (defined $cgi->param('postvote') && length $cgi->param('postvote')) {
-                       $postvote=urlto(bestlink($page, $cgi->param('postvote')));
+               if (defined $cgi->param('postlink') && length $cgi->param('postlink')) {
+                       $postvote=urlto(bestlink($page, $cgi->param('postlink')));
                }
                elsif (defined $cgi->param('posttrail') && length $cgi->param('posttrail')) {
                        my $trailname=bestlink($page, $cgi->param('posttrail'));
index 7b9fdfdc595622364a47fbcb82c14876c5f86126..caaeaeaf0da3a1e3a937ac5534387d192e841dab 100644 (file)
@@ -23,7 +23,7 @@ Parameters:
   another choice to the poll.
 * `total` - Show total number of votes at bottom of poll. Default is "yes".
 * `percent` - Whether to display percents. Default is "yes".
-* `postvote` - By default after voting the updated page containing the poll
+* `postlink` - By default after voting the updated page containing the poll
   is displayed. This parameter allows advancing onward to another page.
   This is useful for multi-page polls.
 * `posttrail` - Similar to postvote, but allows advancing to the next page