summaryrefslogtreecommitdiff
path: root/includes/tablesort.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-09-20 19:24:27 +0000
committerDries Buytaert <dries@buytaert.net>2003-09-20 19:24:27 +0000
commitf9a7182ab211438835a37cbfb45a77b3886c4f67 (patch)
tree9c0eb9c60730e598a651ac612a2fd48d794b720e /includes/tablesort.inc
parent9eb0067ce4d931b5a00d44146cd2f78e9af44a7d (diff)
downloadbrdo-f9a7182ab211438835a37cbfb45a77b3886c4f67.tar.gz
brdo-f9a7182ab211438835a37cbfb45a77b3886c4f67.tar.bz2
- Fixed critical bug #2952: tablesort_init() used a static variable made it
impossible to use more than one sortable table on a page.
Diffstat (limited to 'includes/tablesort.inc')
-rw-r--r--includes/tablesort.inc12
1 files changed, 5 insertions, 7 deletions
diff --git a/includes/tablesort.inc b/includes/tablesort.inc
index 13a9745ab..22b5b9648 100644
--- a/includes/tablesort.inc
+++ b/includes/tablesort.inc
@@ -2,14 +2,12 @@
// $Id$
function tablesort_init($header) {
- static $ts;
- if (!$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();
- }
+ $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;
}