Applying @jbrooksuk implementation (see MR 3273)

This commit is contained in:
VeekeeFr
2018-10-15 18:29:12 +02:00
parent 906024f45b
commit 28ca20f99f

View File

@@ -74,11 +74,7 @@ class StatusPageController extends AbstractApiController
->values();
$numIncidentDays = count($allIncidentDays);
if ($appIncidentDays > 0) {
$numPages = round($numIncidentDays / $appIncidentDays);
} else {
$numPages = 1;
}
$numPages = round($numIncidentDays / max($appIncidentDays, 1));
$selectedDays = $allIncidentDays->slice($page * $appIncidentDays, $appIncidentDays)->all();