* Fix bug #33154.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user