From 85eebfb5ed16a85bd40008e5f045a288bf25dee8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 20 Sep 2003 19:41:35 +0000 Subject: - Fixed problem introduced by partial integration of the administration pages. --- includes/tablesort.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'includes') 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; } -- cgit v1.2.3