This commit is contained in:
tianshujie
2022-04-13 14:22:32 +08:00
parent 90a1fea2d8
commit e681135a3a
3 changed files with 10 additions and 9 deletions
+6 -6
View File
@@ -136,14 +136,14 @@ class programModel extends model
public function getList($status = 'all', $orderBy = 'id_asc', $pager = NULL)
{
return $this->dao->select('*')->from(TABLE_PROGRAM)
->where('type')->in('program,project')
->andWhere('deleted')->eq(0)
->where('deleted')->eq(0)
->andWhere('vision')->eq($this->config->vision)
->beginIF(!$this->app->user->admin)
->andWhere('(id')->in($this->app->user->view->programs)
->orWhere('id')->in($this->app->user->view->projects)
->andWhere('((type')->eq('program')
->beginIF(!$this->app->user->admin and $this->app->rawMethod != 'browse')->andWhere('id')->in($this->app->user->view->programs)->fi()
->markRight(1)
->fi()
->orWhere('(type')->eq('project')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->markRight(2)
->beginIF($status != 'all')->andWhere('status')->eq($status)->fi()
->beginIF(!$this->cookie->showClosed)->andWhere('status')->ne('closed')->fi()
->orderBy($orderBy)