From: Alexander Ebert Date: Thu, 15 Aug 2024 14:52:54 +0000 (+0200) Subject: Skip already queued worker notifications for stacked notifications X-Git-Tag: 6.1.0_Alpha_2~11 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8fcc4aba3c5f8eb2dd7175497d4214c615c1b9d0;p=GitHub%2FWoltLab%2FWCF.git Skip already queued worker notifications for stacked notifications See https://www.woltlab.com/community/thread/307700-fehlermeldung-beim-absenden-eines-beitrags-doppelposting/ --- 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 9a1415c6e2..95b5fe5bbc 100644 --- a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php @@ -308,10 +308,11 @@ class UserNotificationHandler extends SingletonFactory } } - $sql = "INSERT INTO wcf1_service_worker_notification (workerID, notificationID, time) - SELECT workerID, ?, ? - FROM wcf1_service_worker - WHERE userID = ?"; + $sql = "INSERT IGNORE INTO wcf1_service_worker_notification + (workerID, notificationID, time) + SELECT workerID, ?, ? + FROM wcf1_service_worker + WHERE userID = ?"; $statement = WCF::getDB()->prepare($sql); foreach ($notifications as $userID => $notification) {