From 6bad0523e581c6af1ab06dce726e2af1a08d9017 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 1 Sep 2016 20:52:40 -0400 Subject: Do not show closed tasks on public boards --- app/Controller/BoardViewController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/Controller/BoardViewController.php b/app/Controller/BoardViewController.php index 97c99d11..10165908 100644 --- a/app/Controller/BoardViewController.php +++ b/app/Controller/BoardViewController.php @@ -4,6 +4,7 @@ namespace Kanboard\Controller; use Kanboard\Core\Controller\AccessForbiddenException; use Kanboard\Formatter\BoardFormatter; +use Kanboard\Model\TaskModel; /** * Board controller @@ -28,11 +29,15 @@ class BoardViewController extends BaseController throw AccessForbiddenException::getInstance()->withoutLayout(); } + $query = $this->taskFinderModel + ->getExtendedQuery() + ->eq(TaskModel::TABLE.'.is_active', TaskModel::STATUS_OPEN); + $this->response->html($this->helper->layout->app('board/view_public', array( 'project' => $project, 'swimlanes' => BoardFormatter::getInstance($this->container) ->withProjectId($project['id']) - ->withQuery($this->taskFinderModel->getExtendedQuery()) + ->withQuery($query) ->format() , 'title' => $project['name'], -- cgit v1.2.3