[geeklog-cvs] geeklog: Fixed sorting on table style
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Thu Nov 5 17:00:12 EST 2009
changeset 7443:cb0edbf9c9ac
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/cb0edbf9c9ac
user: Sami Barakat <sami at sbarakat.co.uk>
date: Thu Nov 05 21:59:17 2009 +0000
description:
Fixed sorting on table style
diffstat:
system/classes/listfactory.class.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r 5f5387780b30 -r cb0edbf9c9ac system/classes/listfactory.class.php
--- a/system/classes/listfactory.class.php Thu Nov 05 21:35:39 2009 +0000
+++ b/system/classes/listfactory.class.php Thu Nov 05 21:59:17 2009 +0000
@@ -694,6 +694,10 @@
}
else if ($this->_style == 'table')
{
+ $direction = $this->_sort_arr['direction'] == 'asc' ? 'desc' : 'asc';
+ $href = $this->_page_url . "results={$this->_per_page}&" .
+ "order={$field['name']}&direction=$direction";
+
if ($show_sort && $field['sort'] != false)
{
$text = "<a href=\"$href\">$text</a>";
@@ -702,8 +706,6 @@
$selected = $sort_selected;
}
}
- $href = $this->_page_url . "results={$this->_per_page}&" .
- "order={$field['name']}&direction=$direction";
// Write field
$list_templates->set_var('sort_text', $text);
More information about the geeklog-cvs
mailing list