summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorLoui Chang <louipc.ist@gmail.com>2009-12-26 20:30:14 +0100
committerLoui Chang <louipc.ist@gmail.com>2009-12-26 20:36:05 +0100
commit55dcf5ce87f6e3e159ef35daac5eae86b624df3f (patch)
treee5f8aab5c625043873a357cced97f16acc1f95cf /web/html
parent4b109cacc121fc6fd83330494e283306e7799687 (diff)
downloadaur-55dcf5ce87f6e3e159ef35daac5eae86b624df3f.tar.gz
aur-55dcf5ce87f6e3e159ef35daac5eae86b624df3f.tar.xz
tu.php: Sort votes by descending date.
Also make syntax more straightforward. 'asc' is ascending, rather than 'up'. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/tu.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/html/tu.php b/web/html/tu.php
index 1864988b..f0038a58 100644
--- a/web/html/tu.php
+++ b/web/html/tu.php
@@ -106,7 +106,7 @@ if ($atype == "Trusted User" OR $atype == "Developer") {
if (isset($_GET['by']))
$by = $_GET['by'];
else
- $by = 'up';
+ $by = 'desc';
if (!empty($offset) AND is_numeric($offset)) {
if ($offset >= 1) {
@@ -118,9 +118,9 @@ if ($atype == "Trusted User" OR $atype == "Developer") {
$off = 0;
}
- $order = ($by == 'down') ? 'DESC' : 'ASC';
- $lim = ($limit > 0) ? " LIMIT " . $off . ", " . $limit : "";
- $by_next = ($by == "down") ? "up" : "down";
+ $order = ($by == 'asc') ? 'ASC' : 'DESC';
+ $lim = ($limit > 0) ? " LIMIT $off, $limit" : "";
+ $by_next = ($by == 'desc') ? 'asc' : 'desc';
$q = "SELECT * FROM TU_VoteInfo WHERE End > " . time() . " ORDER BY Submitted " . $order;
$result = db_query($q, $dbh);