From: Marcel Werk Date: Thu, 4 Jul 2013 00:26:55 +0000 (+0200) Subject: Fixed import issues X-Git-Tag: 2.0.0_Beta_3~15 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=03da1df8ad8820694c79c448cfc7a39ee673b287;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.conversation.git Fixed import issues --- diff --git a/files/lib/system/importer/ConversationUserImporter.class.php b/files/lib/system/importer/ConversationUserImporter.class.php index 7d5742b..72cf72c 100644 --- a/files/lib/system/importer/ConversationUserImporter.class.php +++ b/files/lib/system/importer/ConversationUserImporter.class.php @@ -23,9 +23,9 @@ class ConversationUserImporter implements IImporter { if (!$data['conversationID']) return 0; $data['participantID'] = ImportHandler::getInstance()->getNewID('com.woltlab.wcf.user', $data['participantID']); - $sql = "INSERT INTO wcf".WCF_N."_conversation_to_user - (conversationID, participantID, hideConversation, isInvisible, lastVisitTime) - VALUES (?, ?, ?)"; + $sql = "INSERT IGNORE INTO wcf".WCF_N."_conversation_to_user + (conversationID, participantID, hideConversation, isInvisible, lastVisitTime) + VALUES (?, ?, ?, ?, ?)"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(array( $data['conversationID'], @@ -37,11 +37,11 @@ class ConversationUserImporter implements IImporter { // save labels if ($data['participantID'] && !empty($data['labelIDs'])) { - $sql = "INSERT INTO wcf".WCF_N."_conversation_label_to_object - (labelID, conversationID) - VALUES (?, ?)"; + $sql = "INSERT IGNORE INTO wcf".WCF_N."_conversation_label_to_object + (labelID, conversationID) + VALUES (?, ?)"; $statement = WCF::getDB()->prepareStatement($sql); - foreach ($data['labelIDs'] as $labelIDs) { + foreach ($data['labelIDs'] as $labelID) { $labelID = ImportHandler::getInstance()->getNewID('com.woltlab.wcf.conversation.label', $labelID); if ($labelID) $statement->execute(array($labelID, $data['conversationID'])); }