+ add the feature of show or hide products and projects.

This commit is contained in:
wangchunsheng
2010-04-24 13:57:33 +00:00
parent 9354dc6758
commit 3e7eb66bf6
8 changed files with 44 additions and 14 deletions

View File

@@ -135,9 +135,11 @@ class projectModel extends model
/* 获得项目id=>name列表。*/
public function getPairs()
{
$mode = $this->cookie->projectMode;
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
->where('iscat')->eq(0)
->andWhere('deleted')->eq(0)
->onCaseOf($mode == 'noclosed')->andWhere('status')->ne('done')->endCase()
->orderBy('status, end desc')->fetchAll();
$pairs = array();
foreach($projects as $project)