From 4f0b10c13d8d85e6ad1818f5ada84477f43df43a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 26 Nov 2018 13:23:50 -0400 Subject: rename postvote to postlink 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 | 2 +- IkiWiki/Plugin/poll.pm | 8 ++++---- doc/ikiwiki/directive/poll.mdwn | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 892dca041..cb7a7a038 100644 --- 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 Wed, 16 May 2018 13:09:27 +0100 diff --git a/IkiWiki/Plugin/poll.pm b/IkiWiki/Plugin/poll.pm index 734fe487e..5a09e2087 100644 --- a/IkiWiki/Plugin/poll.pm +++ b/IkiWiki/Plugin/poll.pm @@ -69,8 +69,8 @@ sub preprocess (@) { $ret.="\n"; $ret.="\n"; $ret.="\n"; - if (defined $params{postvote}) { - $ret.="\n"; + if (defined $params{postlink}) { + $ret.="\n"; } if (defined $params{posttrail}) { $ret.="\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')); diff --git a/doc/ikiwiki/directive/poll.mdwn b/doc/ikiwiki/directive/poll.mdwn index 7b9fdfdc5..caaeaeaf0 100644 --- a/doc/ikiwiki/directive/poll.mdwn +++ b/doc/ikiwiki/directive/poll.mdwn @@ -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 -- cgit v1.2.3