mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Only include current TUs in the last votes list
Do not show users that took part in past TU votes but no longer have TU powers. Also, fix the sorting column while we're touching these lines. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
c1c7f9b350
commit
2276171b29
1 changed files with 4 additions and 3 deletions
|
@ -1004,9 +1004,10 @@ function last_votes_list() {
|
|||
$dbh = DB::connect();
|
||||
|
||||
$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";
|
||||
$q .= "TU_VoteInfo, Users WHERE TU_VoteInfo.ID = TU_Votes.VoteID AND ";
|
||||
$q .= "TU_VoteInfo.End < UNIX_TIMESTAMP() AND ";
|
||||
$q .= "Users.ID = TU_Votes.UserID AND Users.AccountTypeID = 2 ";
|
||||
$q .= "GROUP BY UserID ORDER BY LastVote DESC";
|
||||
$result = $dbh->query($q);
|
||||
|
||||
$details = array();
|
||||
|
|
Loading…
Add table
Reference in a new issue