diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/tablesort.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/includes/tablesort.inc b/includes/tablesort.inc index 22b5b9648..2e16d8a8d 100644 --- a/includes/tablesort.inc +++ b/includes/tablesort.inc @@ -2,11 +2,14 @@ // $Id$ function tablesort_init($header) { + static $ts; - $ts["order"] = tablesort_get_order($header); - $ts["order_sql"] = tablesort_get_order_sql($header, $ts["order"]); - $ts["sort"] = tablesort_get_sort($header); - $ts["query_string"] = tablesort_get_querystring(); + if (empty($ts)) { + $ts["order"] = tablesort_get_order($header); + $ts["order_sql"] = tablesort_get_order_sql($header, $ts["order"]); + $ts["sort"] = tablesort_get_sort($header); + $ts["query_string"] = tablesort_get_querystring(); + } return $ts; } |