From 3b73d9bb3d1b8576a413f1a4e752b19c487cd0c6 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 18 Oct 2011 22:20:27 +0000 Subject: [PATCH] Fix column sorting --- etemplate/inc/class.etemplate_widget_nextmatch.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php index 9613af0d09..179e04ff68 100644 --- a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php +++ b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php @@ -142,9 +142,12 @@ class etemplate_widget_nextmatch extends etemplate_widget $value = array_merge($value, $filters); $result = array('rows' => array()); - // Parse sort into something that get_rows functions are expecting: db_field ASC/DESC + // Parse sort into something that get_rows functions are expecting: db_field in order, ASC/DESC in sort if(is_array($value['sort'])) - $value['sort'] = $value['sort']['id'] . ' ' . $value['sort']['asc'] ? 'ASC' : 'DESC'; + { + $value['order'] = $value['sort']['id']; + $value['sort'] = ($value['sort']['asc'] ? 'ASC' : 'DESC'); + } foreach ($fetchList as $entry) {