From: Alexander Ebert Date: Sun, 23 Nov 2014 22:10:15 +0000 (+0100) Subject: Fixed wrong notification order for confirmed notifications X-Git-Tag: 2.1.0_Beta_1~185 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dcb322d42520f8cecc73b378e28028a432a5abf1;p=GitHub%2FWoltLab%2FWCF.git Fixed wrong notification order for confirmed notifications --- 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