From 335c6f4d500f77c85459ae88b35775d02c218d6f Mon Sep 17 00:00:00 2001 From: James Brooks Date: Wed, 20 Jun 2018 21:31:52 +0100 Subject: [PATCH] Pagination links now work. Fixes #3117 --- app/Http/Controllers/StatusPageController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/StatusPageController.php b/app/Http/Controllers/StatusPageController.php index fdede4d5..409e6372 100644 --- a/app/Http/Controllers/StatusPageController.php +++ b/app/Http/Controllers/StatusPageController.php @@ -92,8 +92,8 @@ class StatusPageController extends AbstractApiController $canPageForward = (bool) $startDate->lt($date->sub('1 day')); $canPageBackward = Incident::where('occurred_at', '<', $date->format('Y-m-d'))->count() > 0; - $previousDate = $date->copy()->subDays($appIncidentDays)->toDateString(); - $nextDate = $date->copy()->addDays($appIncidentDays)->toDateString(); + $previousDate = $startDate->copy()->subDays($appIncidentDays)->toDateString(); + $nextDate = $startDate->copy()->addDays($appIncidentDays)->toDateString(); } $allIncidents = Incident::where('visible', '>=', (int) !Auth::check())->whereBetween('occurred_at', [