From 0a7bad1defefb906cb0d8476bd967d7c486c0813 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Sun, 6 Jan 2013 01:57:35 +0000 Subject: [PATCH] * code for task#1043. --- module/todo/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/todo/model.php b/module/todo/model.php index 274fdd31fe..e61c1d55e5 100644 --- a/module/todo/model.php +++ b/module/todo/model.php @@ -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();