cvs: pearweb / package.php package.xml /include pear-voter.php

From: Date: Tue, 21 Nov 2006 05:17:12 +0000
Subject: cvs: pearweb / package.php package.xml /include pear-voter.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-5209@lists.php.net to get a copy of this message
cellog Tue Nov 21 05:17:12 2006 UTC Modified files: /pearweb/include pear-voter.php /pearweb package.php package.xml Log: * fix Bug #9369: email vote hash and vote choice http://cvs.php.net/viewvc.cgi/pearweb/include/pear-voter.php?r1=1.9&r2=1.10&diff_format=u Index: pearweb/include/pear-voter.php diff -u pearweb/include/pear-voter.php:1.9 pearweb/include/pear-voter.php:1.10 --- pearweb/include/pear-voter.php:1.9 Tue Nov 21 04:29:47 2006 +++ pearweb/include/pear-voter.php Tue Nov 21 05:17:12 2006 @@ -338,9 +338,42 @@ return false; } PEAR::popErrorHandling(); + $this->email($info, $votes, $this->getVoteSalt()); return true; } + function email($election, $votes, $salt) + { + $info = user::info($this->user); + $email = '"' . $info['name'] . '" <' . $info['email'] . '>'; + $headers = "From: bounce-no-user@php.net\n"; + $headers .= "X-Mailer: PEAR election voting interface\n"; + $headers .= "X-PEAR-Election: " . $election['id'] . "\n"; + + $subject = '[PEAR-ELECTION] Your vote in election ' . $election['purpose']; + + if ($votes) { + $text = 'Your vote for the election: ' . $election['purpose'] . "\n" . + 'has been registered. You voted for: +'; + $text .= implode("\n", $votes) . "\n"; + $text .= 'Your vote salt is ' . $salt . "\n"; + $text .= 'this is your only record of the vote salt, without it your vote ' . + 'cannot be retrieved. Thank you for voting'; + } else { + $text = 'Your abstaining vote for the election: ' . $election['purpose'] . "\n" . + 'has been registered.' . "\n"; + $text .= 'Your vote salt is ' . $salt . "\n"; + $text .= 'this is your only record of the vote salt, without it your vote ' . + 'cannot be retrieved. Thank you for voting'; + } + $text .= "\nVisit http://pear.php.net/election.php to retrieve your vote"; + + $res = mail($email, $subject, $text, + $headers, '-f bounce-no-user@php.net'); + return $res; + } + function abstain($id) { if (!$this->user) { @@ -371,6 +404,7 @@ return false; } PEAR::popErrorHandling(); + $this->email($this->electionInfo($id), false, $this->getVoteSalt()); return true; } http://cvs.php.net/viewvc.cgi/pearweb/package.php?r1=1.25&r2=1.26&diff_format=u Index: pearweb/package.php diff -u pearweb/package.php:1.25 pearweb/package.php:1.26 --- pearweb/package.php:1.25 Tue Nov 21 04:43:37 2006 +++ pearweb/package.php Tue Nov 21 05:17:12 2006 @@ -25,6 +25,7 @@ * fix Bug #8842: package.xml package name need not match case and must * fix Bug #9209: Missing package description in proposal editor * fix Bug #9368: election interface needs labels for radio buttons/checkboxes + * fix Bug #9369: email vote hash and vote choice * implement Request #7828: PEAR Bug Summary Report * implement Request #9118: Added new feature to pepr * completely rework account requests, both to simplify/clarify and to allow http://cvs.php.net/viewvc.cgi/pearweb/package.xml?r1=1.54&r2=1.55&diff_format=u Index: pearweb/package.xml diff -u pearweb/package.xml:1.54 pearweb/package.xml:1.55 --- pearweb/package.xml:1.54 Tue Nov 21 04:43:37 2006 +++ pearweb/package.xml Tue Nov 21 05:17:12 2006 @@ -53,7 +53,7 @@ <active>no</active> </developer> <date>2006-11-20</date> - <time>22:43:25</time> + <time>23:16:52</time> <version> <release>1.0.0RC2</release> <api>0.1.1</api> @@ -71,6 +71,7 @@ * fix Bug #8842: package.xml package name need not match case and must * fix Bug #9209: Missing package description in proposal editor * fix Bug #9368: election interface needs labels for radio buttons/checkboxes + * fix Bug #9369: email vote hash and vote choice * implement Request #7828: PEAR Bug Summary Report * implement Request #9118: Added new feature to pepr * completely rework account requests, both to simplify/clarify and to allow @@ -918,6 +919,7 @@ * fix Bug #8842: package.xml package name need not match case and must * fix Bug #9209: Missing package description in proposal editor * fix Bug #9368: election interface needs labels for radio buttons/checkboxes + * fix Bug #9369: email vote hash and vote choice * implement Request #7828: PEAR Bug Summary Report * implement Request #9118: Added new feature to pepr * completely rework account requests, both to simplify/clarify and to allow

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