* code for task#1043.

This commit is contained in:
zhujinyong
2013-01-06 01:57:35 +00:00
parent 8ac9e393dd
commit 0a7bad1def
+2 -2
View File
@@ -231,7 +231,7 @@ class todoModel extends model
* @access public
* @return void
*/
public function getList($date = 'today', $account = '', $status = 'all', $limit = 0, $pager = null)
public function getList($date = 'today', $account = '', $status = 'all', $limit = 0, $pager = null, $orderBy="date, status, begin")
{
$todos = array();
if($date == 'today')
@@ -296,7 +296,7 @@ class todoModel extends model
->andWhere("date <= '$end'")
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi()
->beginIF($status == 'undone')->andWhere('status')->ne('done')->fi()
->orderBy('date, status, begin')
->orderBy($orderBy)
->beginIF($limit > 0)->limit($limit)->fi()
->page($pager)
->query();