[Phpslash-commit] CVS: phpslash-ft/class Poll.class,1.16,1.17
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2002-05-20 15:38:32
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv24314/phpslash-ft/class Modified Files: Poll.class Log Message: Feature Request [ 528683 ] - more Poll answers Index: Poll.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Poll.class,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Poll.class 28 Apr 2002 02:08:26 -0000 1.16 --- Poll.class 20 May 2002 15:38:29 -0000 1.17 *************** *** 69,73 **** )); $this->templ->set_block(editpoll, each_choice, choices); ! for ($i = 1; $i <= $this->psl['poll_max_answers']; $i++) { $this->templ->set_var(array( 'CHOICE_VALUE' => '', --- 69,73 ---- )); $this->templ->set_block(editpoll, each_choice, choices); ! for ($i = 1; $i <= $this->psl['poll_min_answers']; $i++) { $this->templ->set_var(array( 'CHOICE_VALUE' => '', *************** *** 187,191 **** } ! while ($x < $this->psl['poll_max_answers']) { $x++; $this->templ->set_var(array( --- 187,196 ---- } ! if( ($x - $this->psl['poll_min_answers']) >= 0) { ! // spit out one more blank field ! $x = $this->psl['poll_min_answers'] - 1; ! } ! ! while ($x < $this->psl['poll_min_answers']) { $x++; $this->templ->set_var(array( *************** *** 223,227 **** // first we need to get the total number of default votes ! for ($x = 0; $x <= $this->psl['poll_max_answers']; $x ++) { $totalvotes += $votes_ary[$x]; } --- 228,232 ---- // first we need to get the total number of default votes ! for ($x = 0; $x <= count($votes_ary); $x ++) { $totalvotes += $votes_ary[$x]; } *************** *** 285,289 **** /* Now we are going to update/insert the answers */ ! for ($x = 0; $x <= $this->psl['poll_max_answers']; $x++) { $answer = clean($choice_ary[$x]); $vote = clean($votes_ary[$x]); --- 290,294 ---- /* Now we are going to update/insert the answers */ ! for ($x = 0; $x <= count($votes_ary); $x++) { $answer = clean($choice_ary[$x]); $vote = clean($votes_ary[$x]); |