Exclude running votes from "Last Votes by TU"

Showing running votes potentially allows for tracking votes and
associating yes/no/abstain votes with specific TUs.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2013-08-27 10:52:38 +02:00
parent 7b0495cee2
commit 86d2efaaa0

View file

@ -1003,7 +1003,10 @@ function past_proposal_list($order, $lim) {
function last_votes_list() { function last_votes_list() {
$dbh = DB::connect(); $dbh = DB::connect();
$q = "SELECT UserID, MAX(VoteID) AS LastVote FROM TU_Votes GROUP BY UserID ORDER BY VoteID DESC"; $q = "SELECT UserID, MAX(VoteID) AS LastVote FROM TU_Votes, ";
$q .= "TU_VoteInfo WHERE TU_VoteInfo.ID = TU_Votes.VoteID AND ";
$q .= "TU_VoteInfo.End < UNIX_TIMESTAMP() GROUP BY UserID ";
$q .= "ORDER BY VoteID DESC";
$result = $dbh->query($q); $result = $dbh->query($q);
$details = array(); $details = array();