diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2019-12-27 18:58:27 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2019-12-27 18:58:27 +0100 |
commit | 537179df66b1245f034e9bedeff7d74cbc6a7f5c (patch) | |
tree | 1093d44c103f461ecbfd197808b7449b949ecf35 /includes | |
parent | 8f2da568929232fd6cf206909c05ebefc1b24737 (diff) |
Shifts overview: Added filter_max_duration to limit max runtime
Diffstat (limited to 'includes')
-rw-r--r-- | includes/model/ShiftsFilter.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/model/ShiftsFilter.php b/includes/model/ShiftsFilter.php index fe3bfa56..c3811977 100644 --- a/includes/model/ShiftsFilter.php +++ b/includes/model/ShiftsFilter.php @@ -119,6 +119,11 @@ class ShiftsFilter */ public function setEndTime($endTime) { + $filterMaxDuration = config('filter_max_duration') * 60 * 60; + if ($filterMaxDuration && ($endTime - $this->startTime > $filterMaxDuration)) { + $endTime = $this->startTime + $filterMaxDuration; + } + $this->endTime = $endTime; } |