Commit c64b51f2 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

voters.php: Show time stamps if available



Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent e9ebcc44
...@@ -17,7 +17,12 @@ if (has_credential(CRED_PKGBASE_LIST_VOTERS)): ...@@ -17,7 +17,12 @@ if (has_credential(CRED_PKGBASE_LIST_VOTERS)):
<div class="boxbody"> <div class="boxbody">
<ul> <ul>
<?php while (list($indx, $row) = each($votes)): ?> <?php while (list($indx, $row) = each($votes)): ?>
<li><a href="<?= get_user_uri($row['Username']); ?>"><?= htmlspecialchars($row['Username']) ?></a></li> <li>
<a href="<?= get_user_uri($row['Username']); ?>"><?= htmlspecialchars($row['Username']) ?></a>
<?php if ($row["VoteTS"] > 0): ?>
(<?= gmdate("Y-m-d H:i", intval($row["VoteTS"])) ?>)
<?php endif; ?>
</li>
<?php endwhile; ?> <?php endwhile; ?>
</ul> </ul>
</div> </div>
......
...@@ -712,7 +712,7 @@ function pkgbase_vote ($base_ids, $action=true) { ...@@ -712,7 +712,7 @@ function pkgbase_vote ($base_ids, $action=true) {
function pkgbase_votes_from_name($pkgbase_name) { function pkgbase_votes_from_name($pkgbase_name) {
$dbh = DB::connect(); $dbh = DB::connect();
$q = "SELECT UsersID, Username, Name FROM PackageVotes "; $q = "SELECT UsersID, Username, Name, VoteTS FROM PackageVotes ";
$q.= "LEFT JOIN Users ON UsersID = Users.ID "; $q.= "LEFT JOIN Users ON UsersID = Users.ID ";
$q.= "LEFT JOIN PackageBases "; $q.= "LEFT JOIN PackageBases ";
$q.= "ON PackageVotes.PackageBaseID = PackageBases.ID "; $q.= "ON PackageVotes.PackageBaseID = PackageBases.ID ";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment