Fix start-end date for $onlyDisruptedDays

Fixes the changed - order by desc - fix in #2976
This commit is contained in:
Danijel K
2018-04-10 14:22:17 +02:00
committed by GitHub
parent 3c51e5115a
commit 46a69a38e7

View File

@@ -81,8 +81,8 @@ class StatusPageController extends AbstractApiController
$selectedDays = $allIncidentDays->slice($page * $appIncidentDays, $appIncidentDays)->all();
if (count($selectedDays) > 0) {
$startDate = Date::createFromFormat('Y-m-d', array_values(array_slice($selectedDays, -1))[0]);
$endDate = Date::createFromFormat('Y-m-d', array_values($selectedDays)[0]);
$startDate = Date::createFromFormat('Y-m-d', array_values($selectedDays)[0]);
$endDate = Date::createFromFormat('Y-m-d', array_values(array_slice($selectedDays, -1))[0]);
}
$canPageForward = $page > 0;