cvs: docweb /www/rfc rfc-overview.php

From: Date: Sun, 29 Aug 2004 20:26:51 +0000
Subject: cvs: docweb /www/rfc rfc-overview.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-205@lists.php.net to get a copy of this message
vincent Sun Aug 29 16:26:51 2004 EDT Modified files: /docweb/www/rfc rfc-overview.php Log: PEPr patch: * If the current user has already voted on a proposal that is currently in the CfV stage, a note is prepended in front of the list item. http://cvs.php.net/diff.php/docweb/www/rfc/rfc-overview.php?r1=1.2&r2=1.3&ty=u Index: docweb/www/rfc/rfc-overview.php diff -u docweb/www/rfc/rfc-overview.php:1.2 docweb/www/rfc/rfc-overview.php:1.3 --- docweb/www/rfc/rfc-overview.php:1.2 Thu Aug 26 15:07:41 2004 +++ docweb/www/rfc/rfc-overview.php Sun Aug 29 16:26:51 2004 @@ -22,7 +22,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc-overview.php,v 1.2 2004/08/26 19:07:41 vincent Exp $ + * @version $Id: rfc-overview.php,v 1.3 2004/08/29 20:26:51 vincent Exp $ */ /** @@ -75,7 +75,22 @@ if (!isset($users[$proposal->user_handle])) { $users[$proposal->user_handle] = array('Test','name'=>'TestUser');// user::info($proposal->user_handle); // !!! } + + $already_voted = false; + if (isset($_COOKIE['PEAR_USER']) && $proposal->getStatus(true) == "Called for Votes") { + $proposal->getVotes($dbh); + + if (in_array($_COOKIE['PEAR_USER'], array_keys($proposal->votes))) { + $already_voted = true; + } + } + echo "<li>"; + + if ($already_voted) { + echo '(Already voted) '; + } + print_link('rfc-proposal-show.php?id=' . $proposal->id, htmlspecialchars($proposal->pkg_category) . ' :: ' . htmlspecialchars($proposal->pkg_name));

« previous php.doc.web (#205) next »