cvs: pearweb / package.php package.xml /public_html election-info.php

From: Date: Tue, 21 Nov 2006 05:27:06 +0000
Subject: cvs: pearweb / package.php package.xml /public_html election-info.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-5212@lists.php.net to get a copy of this message
cellog Tue Nov 21 05:27:06 2006 UTC Modified files: /pearweb package.php package.xml /pearweb/public_html election-info.php Log: * fix Bug #9371: election interface: each page should check whether voting has already occurred http://cvs.php.net/viewvc.cgi/pearweb/package.php?r1=1.28&r2=1.29&diff_format=u Index: pearweb/package.php diff -u pearweb/package.php:1.28 pearweb/package.php:1.29 --- pearweb/package.php:1.28 Tue Nov 21 05:23:46 2006 +++ pearweb/package.php Tue Nov 21 05:27:06 2006 @@ -27,6 +27,8 @@ * fix Bug #9368: election interface needs labels for radio buttons/checkboxes * fix Bug #9369: email vote hash and vote choice * fix Bug #9370: add easy "back" navigation button for voting interface + * fix Bug #9371: election interface: each page should check whether voting + has already occurred * fix Bug #9372: election interface should separate Abstain button visually on page * implement Request #7828: PEAR Bug Summary Report * implement Request #9118: Added new feature to pepr http://cvs.php.net/viewvc.cgi/pearweb/package.xml?r1=1.57&r2=1.58&diff_format=u Index: pearweb/package.xml diff -u pearweb/package.xml:1.57 pearweb/package.xml:1.58 --- pearweb/package.xml:1.57 Tue Nov 21 05:23:46 2006 +++ pearweb/package.xml Tue Nov 21 05:27:06 2006 @@ -53,7 +53,7 @@ <active>no</active> </developer> <date>2006-11-20</date> - <time>23:23:37</time> + <time>23:26:56</time> <version> <release>1.0.0RC2</release> <api>0.1.1</api> @@ -73,6 +73,8 @@ * fix Bug #9368: election interface needs labels for radio buttons/checkboxes * fix Bug #9369: email vote hash and vote choice * fix Bug #9370: add easy &quot;back&quot; navigation button for voting interface + * fix Bug #9371: election interface: each page should check whether voting + has already occurred * fix Bug #9372: election interface should separate Abstain button visually on page * implement Request #7828: PEAR Bug Summary Report * implement Request #9118: Added new feature to pepr @@ -923,6 +925,8 @@ * fix Bug #9368: election interface needs labels for radio buttons/checkboxes * fix Bug #9369: email vote hash and vote choice * fix Bug #9370: add easy &quot;back&quot; navigation button for voting interface + * fix Bug #9371: election interface: each page should check whether voting + has already occurred * fix Bug #9372: election interface should separate Abstain button visually on page * implement Request #7828: PEAR Bug Summary Report * implement Request #9118: Added new feature to pepr http://cvs.php.net/viewvc.cgi/pearweb/public_html/election-info.php?r1=1.5&r2=1.6&diff_format=u Index: pearweb/public_html/election-info.php diff -u pearweb/public_html/election-info.php:1.5 pearweb/public_html/election-info.php:1.6 --- pearweb/public_html/election-info.php:1.5 Sat Nov 18 08:08:58 2006 +++ pearweb/public_html/election-info.php Tue Nov 21 05:27:06 2006 @@ -13,19 +13,20 @@ require 'pear-voter.php'; $voter = &new PEAR_Voter; if (isset($_POST['confirm'])) { - if (isset($_POST['cancel'])) { + // display vote confirmation page + if (!$voter->electionExists($_POST['election'])) { $currentelections = $voter->listCurrentElections(); $completedelections = $voter->listCompletedElections(); $allelections = $voter->listAllElections(); + $error = 'No such election id: ' . htmlspecialchars($_GET['election']); require dirname(dirname(__FILE__)) . '/templates/election-vote.tpl.php'; exit; } - // display vote confirmation page - if (!$voter->electionExists($_POST['election'])) { + if ($voter->hasVoted($_POST['election'])) { $currentelections = $voter->listCurrentElections(); $completedelections = $voter->listCompletedElections(); $allelections = $voter->listAllElections(); - $error = 'No such election id: ' . htmlspecialchars($_GET['election']); + $error = 'You have already voted in this election'; require dirname(dirname(__FILE__)) . '/templates/election-vote.tpl.php'; exit; } @@ -65,6 +66,14 @@ require dirname(dirname(__FILE__)) . '/templates/election-vote.tpl.php'; exit; } + if ($voter->hasVoted($_POST['election'])) { + $currentelections = $voter->listCurrentElections(); + $completedelections = $voter->listCompletedElections(); + $allelections = $voter->listAllElections(); + $error = 'You have already voted in this election'; + require dirname(dirname(__FILE__)) . '/templates/election-vote.tpl.php'; + exit; + } if (!isset($_POST['vote']) || !is_array($_POST['vote'])) { $_POST['vote'] = array(); }

« previous php.pear.core (#5212) next »