Fix error when sorting/filtering (showed up in timesheet)

This commit is contained in:
Nathan Gray 2011-10-03 15:34:10 +00:00
parent c230e5f99a
commit 155e3ab3b5

View File

@ -137,6 +137,10 @@ class etemplate_widget_nextmatch extends etemplate_widget
$value = array_merge($value, $filters); $value = array_merge($value, $filters);
$result = array('rows' => array()); $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) foreach ($fetchList as $entry)
{ {
$value['start'] = $entry['startIdx']; $value['start'] = $entry['startIdx'];