diff --git a/module/block/control.php b/module/block/control.php index e8237a4b99..23bb4ac43e 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -896,7 +896,8 @@ class block extends control $count = isset($this->params->count) ? (int)$this->params->count : 15; /* Get projects. */ - $projects = $this->loadModel('project')->getOverviewList('byStatus', $status, 'id_desc', $count); + $excludedModel = $this->config->edition == 'max' ? '' : 'waterfall'; + $projects = $this->loadModel('project')->getOverviewList('byStatus', $status, 'id_desc', $count, $excludedModel); if(empty($projects)) { $this->view->projects = $projects; diff --git a/module/project/model.php b/module/project/model.php index b30f4ec843..e46187d781 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -273,16 +273,18 @@ class projectModel extends model * @param string|int $param * @param string $orderBy * @param int $limit + * @param string $excludedModel * @access public * @return array */ - public function getOverviewList($queryType = 'byStatus', $param = 'all', $orderBy = 'id_desc', $limit = 15) + public function getOverviewList($queryType = 'byStatus', $param = 'all', $orderBy = 'id_desc', $limit = 15, $excludedModel = '') { $queryType = strtolower($queryType); $projects = $this->dao->select('*')->from(TABLE_PROJECT) ->where('type')->eq('project') ->andWhere('vision')->eq($this->config->vision) ->andWhere('deleted')->eq(0) + ->beginIF($excludedModel)->andWhere('model')->ne($excludedModel)->fi() ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi() ->beginIF($queryType == 'bystatus' and $param == 'undone')->andWhere('status')->notIN('done,closed')->fi() ->beginIF($queryType == 'bystatus' and $param != 'all' and $param != 'undone')->andWhere('status')->eq($param)->fi()