summaryrefslogtreecommitdiff
path: root/app/Controller/Calendar.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-20 15:53:28 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-20 15:53:28 -0400
commit2021dccc5a444f60c5ba1673d94b39999912cd26 (patch)
tree5d805496f001456baa83c0776a32bdb24511511b /app/Controller/Calendar.php
parenta0124b45f9dab8a0f7d4879d4ea147b414b25bf2 (diff)
Move subtask forecast to a plugin
Plugin repo: https://github.com/kanboard/plugin-subtask-forecast
Diffstat (limited to 'app/Controller/Calendar.php')
-rw-r--r--app/Controller/Calendar.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/app/Controller/Calendar.php b/app/Controller/Calendar.php
index 8a24d705..5ac92622 100644
--- a/app/Controller/Calendar.php
+++ b/app/Controller/Calendar.php
@@ -52,6 +52,12 @@ class Calendar extends Base
// Tasks with due date
$events = array_merge($events, $filter->copy()->filterByDueDateRange($start, $end)->toAllDayCalendarEvents());
+ $events = $this->hook->merge('controller:calendar:project:events', $events, array(
+ 'project_id' => $project_id,
+ 'start' => $start,
+ 'end' => $end,
+ ));
+
$this->response->json($events);
}
@@ -83,10 +89,11 @@ class Calendar extends Base
$events = array_merge($events, $this->subtaskTimeTracking->getUserCalendarEvents($user_id, $start, $end));
}
- // Subtask estimates
- if ($this->config->get('calendar_user_subtasks_forecast') == 1) {
- $events = array_merge($events, $this->subtaskForecast->getCalendarEvents($user_id, $end));
- }
+ $events = $this->hook->merge('controller:calendar:user:events', $events, array(
+ 'user_id' => $user_id,
+ 'start' => $start,
+ 'end' => $end,
+ ));
$this->response->json($events);
}