master
joey 2006-11-26 20:53:29 +00:00
parent 8b97cce53f
commit 10a45c8f43
1 changed files with 1 additions and 1 deletions

View 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 >=0 ? $2-1 : 0))." \"$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]]";