[geeklog-cvs] geeklog: Fixed sorting and limiting the results at the same time...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Oct 17 21:27:25 EDT 2009
changeset 7389:abd5bf00c26b
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/abd5bf00c26b
user: Sami Barakat
date: Sun Oct 18 02:25:07 2009 +0100
description:
Fixed sorting and limiting the results at the same time (bug #0001007)
diffstat:
system/classes/listfactory.class.php | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r dbf2c1e5cedc -r abd5bf00c26b system/classes/listfactory.class.php
--- a/system/classes/listfactory.class.php Sun Oct 18 02:06:26 2009 +0100
+++ b/system/classes/listfactory.class.php Sun Oct 18 02:25:07 2009 +0100
@@ -2,7 +2,7 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.6 |
+// | Geeklog 1.6.1 |
// +---------------------------------------------------------------------------+
// | listfactory.class.php |
// | |
@@ -528,7 +528,9 @@
foreach ($this->_page_limits as $key => $val)
{
$text = is_numeric($key) ? sprintf($LANG09[67], $val) : $key;
- $href = $this->_page_url . "results=$val";
+ $href = $this->_page_url . "order={$this->_sort_arr['field']}&" .
+ "direction={$this->_sort_arr['direction']}&results=$val";
+
$selected = $this->_per_page == $val ? ' selected="selected"' : '';
$list_templates->set_var('limit_text', $text);
@@ -584,7 +586,8 @@
$text .= " ($direction)";
}
- $href = $this->_page_url . "order={$field['name']}&direction=$direction";
+ $href = $this->_page_url . "results={$this->_per_page}&" .
+ "order={$field['name']}&direction=$direction";
if ($this->_style == 'table') {
$text = "<a href=\"$href\">$text</a>";
More information about the geeklog-cvs
mailing list