From c5481618a723599dea8f0686d2714a842e5ebb45 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 25 Jul 2015 14:05:27 -0400 Subject: Avoid PHP 5.3 issue --- app/Model/ProjectDailyColumnStats.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/Model') diff --git a/app/Model/ProjectDailyColumnStats.php b/app/Model/ProjectDailyColumnStats.php index d5c72c12..774ed7f9 100644 --- a/app/Model/ProjectDailyColumnStats.php +++ b/app/Model/ProjectDailyColumnStats.php @@ -30,9 +30,9 @@ class ProjectDailyColumnStats extends Base */ public function updateTotals($project_id, $date) { - return $this->db->transaction(function($db) use ($project_id, $date) { + $status = $this->config->get('cfd_include_closed_tasks') == 1 ? array(Task::STATUS_OPEN, Task::STATUS_CLOSED) : array(Task::STATUS_OPEN); - $status = $this->config->get('cfd_include_closed_tasks') == 1 ? array(Task::STATUS_OPEN, Task::STATUS_CLOSED) : array(Task::STATUS_OPEN); + return $this->db->transaction(function($db) use ($project_id, $date, $status) { $column_ids = $db->table(Board::TABLE)->eq('project_id', $project_id)->findAllByColumn('id'); -- cgit v1.2.3