diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-11-08 14:50:02 -0800 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-11-08 14:50:02 -0800 |
commit | cafbd1f5a7e60d931e4dbd700b12e5f50319340d (patch) | |
tree | 10379ec3d0ced6dbdc1da2b78071added257f101 /app/Filter/TaskDueDateRangeFilter.php | |
parent | 5e98a66aeb108b84ca4f2ae824c0a191fbd514cd (diff) |
Improve iCalendar feed to include tasks with start/end date and due date with a time
Diffstat (limited to 'app/Filter/TaskDueDateRangeFilter.php')
-rw-r--r-- | app/Filter/TaskDueDateRangeFilter.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Filter/TaskDueDateRangeFilter.php b/app/Filter/TaskDueDateRangeFilter.php index a6aefbe2..a4250f80 100644 --- a/app/Filter/TaskDueDateRangeFilter.php +++ b/app/Filter/TaskDueDateRangeFilter.php @@ -32,6 +32,11 @@ class TaskDueDateRangeFilter extends BaseFilter implements FilterInterface */ public function apply() { + $this->query->beginOr(); + $this->query->isNull(TaskModel::TABLE.'.date_started'); + $this->query->eq(TaskModel::TABLE.'.date_started', 0); + $this->query->closeOr(); + $this->query->gte(TaskModel::TABLE.'.date_due', is_numeric($this->value[0]) ? $this->value[0] : strtotime($this->value[0])); $this->query->lte(TaskModel::TABLE.'.date_due', is_numeric($this->value[1]) ? $this->value[1] : strtotime($this->value[1])); return $this; |