From f3404d8b66adb58511e172733b9a6e2ad2ba17a2 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 24 Feb 2016 07:34:51 +0100 Subject: [PATCH] Fix issue when dismissing dismissed notice This can happen if the notice is dismissed in two tabs one at a time. --- .../install/files/lib/data/notice/NoticeAction.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/data/notice/NoticeAction.class.php b/wcfsetup/install/files/lib/data/notice/NoticeAction.class.php index 165ca3a3bc..bc32de6784 100644 --- a/wcfsetup/install/files/lib/data/notice/NoticeAction.class.php +++ b/wcfsetup/install/files/lib/data/notice/NoticeAction.class.php @@ -72,9 +72,9 @@ class NoticeAction extends AbstractDatabaseObjectAction implements ISortableActi */ public function dismiss() { if (WCF::getUser()->userID) { - $sql = "INSERT INTO wcf".WCF_N."_notice_dismissed - (noticeID, userID) - VALUES (?, ?)"; + $sql = "INSERT IGNORE INTO wcf".WCF_N."_notice_dismissed + (noticeID, userID) + VALUES (?, ?)"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(array( reset($this->objectIDs), -- 2.20.1