From 49c8e5c1be15b9732023703473bb7e15864770f6 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 18 Feb 2017 13:38:51 -0500 Subject: Prevent people to remove swimlanes that contains tasks --- app/Controller/SwimlaneController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/Controller/SwimlaneController.php') diff --git a/app/Controller/SwimlaneController.php b/app/Controller/SwimlaneController.php index d99cfa7a..0d81d83c 100644 --- a/app/Controller/SwimlaneController.php +++ b/app/Controller/SwimlaneController.php @@ -40,10 +40,11 @@ class SwimlaneController extends BaseController public function index() { $project = $this->getProject(); + $swimlanes = $this->swimlaneModel->getAllWithTaskCount($project['id']); $this->response->html($this->helper->layout->project('swimlane/index', array( - 'active_swimlanes' => $this->swimlaneModel->getAllByStatus($project['id'], SwimlaneModel::ACTIVE), - 'inactive_swimlanes' => $this->swimlaneModel->getAllByStatus($project['id'], SwimlaneModel::INACTIVE), + 'active_swimlanes' => $swimlanes['active'], + 'inactive_swimlanes' => $swimlanes['inactive'], 'project' => $project, 'title' => t('Swimlanes') ))); -- cgit v1.2.3