logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

cvs: pearweb /public_html/pepr pepr-overview.php: msg#00183

Subject: cvs: pearweb /public_html/pepr pepr-overview.php
mj              Sat Aug 28 17:27:39 2004 EDT

  Modified files:              
    /pearweb/public_html/pepr   pepr-overview.php 
  Log:
  * 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/pearweb/public_html/pepr/pepr-overview.php?r1=1.7&r2=1.8&ty=u
Index: pearweb/public_html/pepr/pepr-overview.php
diff -u pearweb/public_html/pepr/pepr-overview.php:1.7 
pearweb/public_html/pepr/pepr-overview.php:1.8
--- pearweb/public_html/pepr/pepr-overview.php:1.7      Wed Jul 14 22:14:12 2004
+++ pearweb/public_html/pepr/pepr-overview.php  Sat Aug 28 17:27:39 2004
@@ -20,7 +20,7 @@
  * @author    Daniel Convissor <danielc@xxxxxxx>
  * @copyright Copyright (c) 1997-2004 The PHP Group
  * @license   http://www.php.net/license/3_0.txt  PHP License
- * @version   $Id: pepr-overview.php,v 1.7 2004/07/15 02:14:12 danielc Exp $
+ * @version   $Id: pepr-overview.php,v 1.8 2004/08/28 21:27:39 mj Exp $
  */
 
 /**
@@ -70,7 +70,20 @@
     if (!isset($users[$proposal->user_handle])) {
         $users[$proposal->user_handle] = user::info($proposal->user_handle);
     }
+
+    $already_voted = false;
+    if (isset($auth_user) && $proposal->getStatus(true) == "Called for Votes") 
{
+        $proposal->getVotes($dbh);
+
+        if (in_array($auth_user->handle, array_keys($proposal->votes))) {
+            $already_voted = true;
+        }
+    }
+
     echo "<li>";
+    if ($already_voted) {
+        echo '(Already voted) ';
+    }
     print_link('pepr-proposal-show.php?id=' . $proposal->id,
                htmlspecialchars($proposal->pkg_category) . ' :: '
                . htmlspecialchars($proposal->pkg_name));

-- 
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>