+ add limit param to the getList() method.

This commit is contained in:
wangchunsheng
2011-06-28 08:06:18 +00:00
parent 8ade5970cb
commit 291d78cdb0

View File

@@ -211,15 +211,17 @@ class projectModel extends model
* Get project lists.
*
* @param string $status
* @param int $limit
* @access public
* @return array
*/
public function getList($status = 'all')
public function getList($status = 'all', $limit = 0)
{
return $this->dao->select('*')->from(TABLE_PROJECT)->where('iscat')->eq(0)
->beginIF($status != 'all')->andWhere('status')->in($status)->fi()
->andWhere('deleted')->eq(0)
->orderBy('status, end DESC')
->beginIF($limit)->limit($limit)->fi()
->fetchAll();
}