diff options
Diffstat (limited to 'app/Controller')
-rw-r--r-- | app/Controller/Calendar.php | 4 | ||||
-rw-r--r-- | app/Controller/Config.php | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/Controller/Calendar.php b/app/Controller/Calendar.php index 6cfa2bad..49c7f56e 100644 --- a/app/Controller/Calendar.php +++ b/app/Controller/Calendar.php @@ -82,7 +82,9 @@ class Calendar extends Base $subtask_timeslots = $this->subtaskTimeTracking->getUserCalendarEvents($user_id, $start, $end); - $this->response->json(array_merge($due_tasks, $subtask_timeslots)); + $subtask_forcast = $this->config->get('subtask_forecast') == 1 ? $this->subtaskForecast->getCalendarEvents($user_id, $end) : array(); + + $this->response->json(array_merge($due_tasks, $subtask_timeslots, $subtask_forcast)); } /** diff --git a/app/Controller/Config.php b/app/Controller/Config.php index bee897be..6f3bc43c 100644 --- a/app/Controller/Config.php +++ b/app/Controller/Config.php @@ -41,7 +41,7 @@ class Config extends Base $values = $this->request->getValues(); if ($redirect === 'board') { - $values += array('subtask_restriction' => 0, 'subtask_time_tracking' => 0); + $values += array('subtask_restriction' => 0, 'subtask_time_tracking' => 0, 'subtask_forecast' => 0); } if ($this->config->save($values)) { |