diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-03-30 21:01:19 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-03-30 21:01:19 +0000 |
commit | 9c66f4f470242e1942e87e247de915ac4d988e20 (patch) | |
tree | 52655f91e2c8c3a4be4fdcd0f89c45c37f72698a | |
parent | 637898ecc3bd4ca21a721b50e60a1e5aaa137018 (diff) | |
download | brdo-9c66f4f470242e1942e87e247de915ac4d988e20.tar.gz brdo-9c66f4f470242e1942e87e247de915ac4d988e20.tar.bz2 |
- Patch #6774 by jhriggs: fixed tablesort sort order reversal errors.
-rw-r--r-- | includes/tablesort.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/tablesort.inc b/includes/tablesort.inc index 352b68c35..b5b5c31d8 100644 --- a/includes/tablesort.inc +++ b/includes/tablesort.inc @@ -31,6 +31,7 @@ function tablesort($cell, $header) { // special formatting for the currently sorted column header if ($cell['data'] == $ts['order']) { + $ts['sort'] = (($ts['sort'] == 'asc') ? 'desc' : 'asc'); $cell['class'] = 'cell-highlight'; $image = ' <img src="' . theme('image', 'arrow-' . $ts['sort'] . '.gif') . '" alt="'. t('sort icon') .'" />'; $title = ($ts['sort'] == 'asc' ? t("sort ascending") : t("sort descending")); @@ -89,7 +90,7 @@ function tablesort_get_order_sql($header, $order) { function tablesort_get_sort($headers) { if ($_GET['sort']) { - return ($_GET['sort'] == 'desc') ? 'asc' : 'desc'; + return ($_GET['sort'] == 'desc') ? 'desc' : 'asc'; } // user has not specified a sort. check module for default and if none, use 'asc' else { |