From ab262ad17652e011c765dba28a4cfb81c4b6a1d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 4 Dec 2013 21:32:55 +0100 Subject: [PATCH] Fix issue in conversation export (MyBB) --- files/lib/system/exporter/MyBB16xExporter.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/files/lib/system/exporter/MyBB16xExporter.class.php b/files/lib/system/exporter/MyBB16xExporter.class.php index 2496219..90bb520 100644 --- a/files/lib/system/exporter/MyBB16xExporter.class.php +++ b/files/lib/system/exporter/MyBB16xExporter.class.php @@ -634,8 +634,10 @@ class MyBB16xExporter extends AbstractExporter { * Exports conversation recipients. */ public function exportConversationUsers($offset, $limit) { - $sql = "SELECT * - FROM ".$this->databasePrefix."privatemessages + $sql = "SELECT message_table.*, user_table.username + FROM ".$this->databasePrefix."privatemessages message_table + LEFT JOIN ".$this->databasePrefix."users user_table + ON user_table.uid = message_table.uid ORDER BY pmid ASC"; $statement = $this->database->prepareStatement($sql, $limit, $offset); $statement->execute(); @@ -644,6 +646,7 @@ class MyBB16xExporter extends AbstractExporter { ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array( 'conversationID' => $row['fromid'].'-'.$row['dateline'], 'participantID' => $row['uid'], + 'username' => $row['username'] ?: '', 'hideConversation' => $row['deletetime'] ? 1 : 0, 'isInvisible' => (isset($recipients['bcc']) && in_array($row['uid'], $recipients['bcc'])) ? 1 : 0, 'lastVisitTime' => $row['readtime'] -- 2.20.1