1.1 --- a/system/classes/listfactory.class.php Thu Nov 05 21:35:39 2009 +0000
1.2 +++ b/system/classes/listfactory.class.php Thu Nov 05 21:59:17 2009 +0000
1.3 @@ -694,6 +694,10 @@
1.4 }
1.5 else if ($this->_style == 'table')
1.6 {
1.7 + $direction = $this->_sort_arr['direction'] == 'asc' ? 'desc' : 'asc';
1.8 + $href = $this->_page_url . "results={$this->_per_page}&" .
1.9 + "order={$field['name']}&direction=$direction";
1.10 +
1.11 if ($show_sort && $field['sort'] != false)
1.12 {
1.13 $text = "<a href=\"$href\">$text</a>";
1.14 @@ -702,8 +706,6 @@
1.15 $selected = $sort_selected;
1.16 }
1.17 }
1.18 - $href = $this->_page_url . "results={$this->_per_page}&" .
1.19 - "order={$field['name']}&direction=$direction";
1.20
1.21 // Write field
1.22 $list_templates->set_var('sort_text', $text);