]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
bugfix
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 26 Nov 2006 20:52:37 +0000 (20:52 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 26 Nov 2006 20:52:37 +0000 (20:52 +0000)
IkiWiki/Plugin/poll.pm
doc/news/openid.mdwn

index bca8f5d547e23552b1eb7338495754b9541c0eef..d598c32089b69db93e522660eede73a25eddd9e7 100644 (file)
@@ -108,7 +108,7 @@ sub cgi ($) { #{{{
                        if (--$num == 0) {
                                $params=~s/(^|\s+)(\d+)\s+"?\Q$choice\E"?(\s+|$)/$1.($2+1)." \"$choice\"".$3/se;
                                if (defined $oldchoice) {
-                                       $params=~s/(^|\s+)(\d+)\s+"?\Q$oldchoice\E"?(\s+|$)/$1.($2-1)." \"$oldchoice\"".$3/se;
+                                       $params=~s/(^|\s+)(\d+)\s+"?\Q$oldchoice\E"?(\s+|$)/$1.($2-1 >=0 ? $2-1 : 0))." \"$oldchoice\"".$3/se;
                                }
                        }
                        return "[[poll $params]]";
index 742fa06a97d52106f4cfd8edf33ec0f31d5996e2..f13aeed8bebf7cdf5cdd799f57ca7f598a67363e 100644 (file)
@@ -10,6 +10,6 @@ log back in, try out the OpenID signup process if you don't already have an
 OpenID, and see how OpenID works for you. And let me know your feelings about
 making such a switch.
 
-[[poll -1 "Accept only OpenID for logins" 1 "Accept only password logins" 0 "Accept both"]]
+[[poll 0 "Accept only OpenID for logins" 1 "Accept only password logins" 0 "Accept both"]]
 
 --[[Joey]]