diff --git a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php index 61d1e0c827..3ea857a34e 100644 --- a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php +++ b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php @@ -137,6 +137,10 @@ 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 + if(is_array($value['sort'])) + $value['sort'] = $value['sort']['id'] . ' ' . $value['sort']['asc'] ? 'ASC' : 'DESC'; + foreach ($fetchList as $entry) { $value['start'] = $entry['startIdx'];