PDA


View Full Version : Poll Module - Calculating Incorrectly for Multiple Choice Polls


ConqSoft
07-24-2005, 01:32 AM
Compare the results:

CMPS: http://www.fireblades.org/
Thread: http://www.fireblades.org/forums/showthread.php?t=36871

It was changed/fixed back in v3.0.5:
http://www.vbulletin.com/forum/bugs.php?do=view&bugid=3639

Brian
07-24-2005, 11:02 PM
Thanks for pointing that out. I went ahead and took care of this for you since I was looking at that online users issue for you anyways. For anyone else that's having this problem, look in your modules/currentpoll.php file for this code:
foreach ($splitvotes AS $key => $value)
{
$pollinfo['nvotes'] += $value;
}


Replace with this:
$pollinfo['nvotes'] = iif($pollinfo['multiple'], $pollinfo['voters'], array_sum($splitvotes));


And that should take care of the problem.