* completed story #251:when creating resources,the resources which have been deleted are not list.

This commit is contained in:
fujia
2010-06-30 02:19:11 +00:00
parent 326a49f51a
commit 84be9473f3
6 changed files with 41 additions and 15 deletions

View File

@@ -338,12 +338,15 @@ class projectModel extends model
}
/* 获取团队成员account=>name列表。*/
public function getTeamMemberPairs($projectID)
public function getTeamMemberPairs($projectID, $params = '')
{
$users = $this->dao->select('t1.account, t2.realname')->from(TABLE_TEAM)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
->where('t1.project')->eq((int)$projectID)
->andWHere('t2.company')->eq($this->app->company->id)
->beginIF($params == 'nodeleted')
->andWhere('t2.deleted')->eq(0)
->fi()
->fetchPairs();
if(!$users) return array();
foreach($users as $account => $realName)