Pagination links now work. Fixes #3117

This commit is contained in:
James Brooks
2018-06-20 21:31:52 +01:00
parent 7298e1e25a
commit 335c6f4d50

View File

@@ -92,8 +92,8 @@ class StatusPageController extends AbstractApiController
$canPageForward = (bool) $startDate->lt($date->sub('1 day')); $canPageForward = (bool) $startDate->lt($date->sub('1 day'));
$canPageBackward = Incident::where('occurred_at', '<', $date->format('Y-m-d'))->count() > 0; $canPageBackward = Incident::where('occurred_at', '<', $date->format('Y-m-d'))->count() > 0;
$previousDate = $date->copy()->subDays($appIncidentDays)->toDateString(); $previousDate = $startDate->copy()->subDays($appIncidentDays)->toDateString();
$nextDate = $date->copy()->addDays($appIncidentDays)->toDateString(); $nextDate = $startDate->copy()->addDays($appIncidentDays)->toDateString();
} }
$allIncidents = Incident::where('visible', '>=', (int) !Auth::check())->whereBetween('occurred_at', [ $allIncidents = Incident::where('visible', '>=', (int) !Auth::check())->whereBetween('occurred_at', [