From ef689d001dfad0ffe309d8cee0c5b3893f290dd4 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 15 Mar 2024 21:57:48 +0000 Subject: [PATCH] more code fixes --- Controller/BackendController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 7febc50..1ba0a9b 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -54,7 +54,7 @@ final class BackendController extends Controller implements DashboardElementInte $view->data['notifications'] = NotificationMapper::getAll() ->where('createdFor', $request->header->account) ->where('seenAt', null) - ->where('createdAt', new \DateTime('now'), '<') // Don't show pre-created notifications + ->where('createdAt', new \DateTime('now'), '<') // Don't show future notifications ->sort('createdAt', OrderType::ASC) ->execute(); @@ -73,7 +73,7 @@ final class BackendController extends Controller implements DashboardElementInte $view->data['notifications'] = NotificationMapper::getAll() ->where('createdFor', $request->header->account) ->where('seenAt', null) - ->where('createdAt', new \DateTime('now'), '<') // Don't show pre-created notifications + ->where('createdAt', new \DateTime('now'), '<') // Don't show future notifications ->sort('createdAt', OrderType::ASC) ->limit(5) ->execute(); @@ -95,7 +95,7 @@ final class BackendController extends Controller implements DashboardElementInte return NotificationMapper::count() ->where('createdFor', $account) ->where('seenAt', null) - ->where('createdAt', new \DateTime('now'), '<') // Don't show pre-created notifications - ->execute(); + ->where('createdAt', new \DateTime('now'), '<') // Don't show future notifications + ->executeCount(); } }