Also make syntax more straightforward. 'asc' is ascending, rather than 'up'. Signed-off-by: Loui Chang <louipc.ist@gmail.com> --- The previous patch seems to reverse the meaning of up/down. This patch changes it to asc/desc. web/html/tu.php | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/html/tu.php b/web/html/tu.php index 1864988..f0038a5 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); -- 1.6.5.5