This commit is contained in:
Yagami
2023-03-21 14:02:36 +08:00
parent 57d9038f3a
commit 3f307b913d
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ class program extends control
/* Get top programs and projects. */
$topObjects = $this->program->getList($status == 'unclosed' ? 'doing,suspended,wait' : $status, $orderBy, $pager, 'top');
if(!$topObjects) $topObjects = array(0);
$programs = $this->program->getList($status == 'closed' ? 'closed' : 'all', $orderBy, NULL, 'child', array_keys($topObjects));
$programs = $this->program->getList($status, $orderBy, NULL, 'child', array_keys($topObjects));
/* Get summary. */
$topCount = $indCount = 0;
+2 -1
View File
@@ -191,7 +191,8 @@ class programModel extends model
->where('type')->in('program,project')
->andWhere('deleted')->eq(0)
->andWhere('vision')->eq($this->config->vision)
->beginIF($status != 'all')->andWhere('status')->in($status)->fi()
->beginIF($status != 'all' and $status != 'unclosed')->andWhere('status')->in($status)->fi()
->beginIF($status == 'unclosed')->andWhere('status')->ne('closed')->fi()
->beginIF($this->app->rawMethod == 'browse' and $type === 'top')->andWhere('parent')->eq(0)->fi()
->beginIF($this->app->rawMethod == 'browse' and ($type === 'child' or !$this->app->user->admin))->andWhere('id')->in($objectIdList)->fi()
->beginIF(!$this->app->user->admin and $this->app->rawMethod != 'browse')->andWhere('id')->in($userViewIdList)->fi()