[geeklog-cvs] geeklog: Preliminary fix for search result sorting (feature requ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Sep 21 15:26:02 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/65bb4649e883
changeset: 7333:65bb4649e883
user:      Sami Barakat
date:      Mon Sep 21 20:23:48 2009 +0100
description:
Preliminary fix for search result sorting (feature request #0000910)

diffstat:

 system/classes/listfactory.class.php |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r 30e040149cbe -r 65bb4649e883 system/classes/listfactory.class.php
--- a/system/classes/listfactory.class.php	Sun Sep 20 10:41:17 2009 +0200
+++ b/system/classes/listfactory.class.php	Mon Sep 21 20:23:48 2009 +0100
@@ -545,6 +545,12 @@
             if (!$show_sort) {
                 $list_templates->set_var('show_sort', 'display:none;');
             }
+
+            // Write field
+            $list_templates->set_var('sort_text', "$sort_text...");
+            $list_templates->set_var('sort_href', "");
+            $list_templates->set_var('sort_selected', $sort_selected);
+            $list_templates->parse('page_sort', 'sort', true);
         }
 
         // Draw the sorting select box/table headings
@@ -561,8 +567,9 @@
 
                     // Show the sort arrow
                     if ($this->_sort_arr['field'] === $field['name']) {
-                        $selected = $sort_selected;
+                        //$selected = $sort_selected;
                         $direction = $this->_sort_arr['direction'] == 'asc' ? 'desc' : 'asc';
+                        $text .= " ($direction)";
                     }
 
                     $href = $this->_page_url . "order={$field['name']}&direction=$direction";



More information about the geeklog-cvs mailing list