From dcb322d42520f8cecc73b378e28028a432a5abf1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 23 Nov 2014 23:10:15 +0100 Subject: [PATCH] Fixed wrong notification order for confirmed notifications --- .../user/notification/UserNotificationHandler.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php index 7a32989e1d..d2cc14fc18 100644 --- a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php @@ -341,13 +341,14 @@ class UserNotificationHandler extends SingletonFactory { $conditions = new PreparedStatementConditionBuilder(); $conditions->add("notification.userID = ?", array(WCF::getUser()->userID)); + $orderBy = 'notification.time DESC'; if ($filterByConfirmed !== null) { // fetch the oldest, unconfirmed notifications, order will be reversed using PHP - $orderBy = 'notification.time ASC'; $conditions->add("notification.confirmed = ?", array($filterByConfirmed)); - } - else { - $orderBy = 'notification.time DESC'; + + if ($filterByConfirmed = 0) { + $orderBy = 'notification.time ASC'; + } } $sql = "SELECT notification.*, notification_event.eventID, object_type.objectType -- 2.20.1