From: Tim Düsterhus Date: Wed, 4 Dec 2013 20:32:55 +0000 (+0100) Subject: Fix issue in conversation export (MyBB) X-Git-Tag: 2.0.0_RC_4~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ab262ad17652e011c765dba28a4cfb81c4b6a1d3;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.exporter.git Fix issue in conversation export (MyBB) --- 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']