From 5cc33e886935d62a61658a6f58c76891a3b5671f Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 22 Jun 2015 18:08:15 +0200 Subject: [PATCH] Fixed daily mail notifications --- .../cronjob/DailyMailNotificationCronjob.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php b/wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php index 2cf66e3461..d0fdf97487 100644 --- a/wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php @@ -34,11 +34,14 @@ class DailyMailNotificationCronjob extends AbstractCronjob { $userIDs = array(); $sql = "SELECT DISTINCT userID FROM wcf".WCF_N."_user_notification - WHERE mailNotified = 0 - AND time < ?"; + WHERE mailNotified = ? + AND time < ? + AND confirmTime = ?"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(array( - TIME_NOW - 3600 * 23 + 0, + TIME_NOW - 3600 * 23, + 0 )); while ($row = $statement->fetchArray()) { $userIDs[] = $row['userID']; @@ -55,6 +58,7 @@ class DailyMailNotificationCronjob extends AbstractCronjob { $conditions = new PreparedStatementConditionBuilder(); $conditions->add("notification.userID IN (?)", array($userIDs)); $conditions->add("notification.mailNotified = ?", array(0)); + $conditions->add("notification.confirmTime = ?", array(0)); $sql = "SELECT notification.*, notification_event.eventID, object_type.objectType FROM wcf".WCF_N."_user_notification notification -- 2.20.1