Workaround for duplicates in `wcf1_message_embedded_object`
authorMarcel Werk <burntime@woltlab.com>
Fri, 1 Dec 2023 14:31:50 +0000 (15:31 +0100)
committerMarcel Werk <burntime@woltlab.com>
Fri, 1 Dec 2023 14:31:50 +0000 (15:31 +0100)
see https://github.com/WoltLab/WCF/issues/5719

wcfsetup/install/files/lib/data/attachment/GroupedAttachmentList.class.php

index faf134a949639f952fe2d3e8ee36f1c88264dc7f..8b2fc73acf1785260d383078c9d36223ab8d01d8 100644 (file)
@@ -53,7 +53,7 @@ class GroupedAttachmentList extends AttachmentList
 
         $this->getConditionBuilder()->add(
             '(
-                SELECT  embeddedObjectID
+                SELECT  DISTINCT embeddedObjectID
                 FROM    wcf' . WCF_N . '_message_embedded_object
                 WHERE   messageObjectTypeID = ?
                     AND messageID = attachment.objectID