From: Alexander Ebert Date: Sun, 26 Jun 2016 15:23:31 +0000 (+0200) Subject: Updated message context for html processors X-Git-Tag: 3.0.0_Beta_1~60 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a94cad7f748e8d45238d28245d9a94ceea515543;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.conversation.git Updated message context for html processors --- diff --git a/files/lib/data/conversation/message/ConversationMessageAction.class.php b/files/lib/data/conversation/message/ConversationMessageAction.class.php index 63edb38..6d7a6f7 100644 --- a/files/lib/data/conversation/message/ConversationMessageAction.class.php +++ b/files/lib/data/conversation/message/ConversationMessageAction.class.php @@ -154,7 +154,7 @@ class ConversationMessageAction extends AbstractDatabaseObjectAction implements // save embedded objects if (!empty($this->parameters['htmlInputProcessor'])) { - if (MessageEmbeddedObjectManager::getInstance()->registerObjects($this->parameters['htmlInputProcessor'], 'com.woltlab.wcf.conversation.message', $message->messageID)) { + if (MessageEmbeddedObjectManager::getInstance()->registerObjects($this->parameters['htmlInputProcessor'])) { $messageEditor->update(['hasEmbeddedObjects' => 1]); } } @@ -192,7 +192,7 @@ class ConversationMessageAction extends AbstractDatabaseObjectAction implements SearchIndexManager::getInstance()->update('com.woltlab.wcf.conversation.message', $message->messageID, $this->parameters['data']['message'], ($conversation->firstMessageID == $message->messageID ? $conversation->subject : ''), $message->time, $message->userID, $message->username); if (!empty($this->parameters['htmlInputProcessor'])) { - if ($message->hasEmbeddedObjects != MessageEmbeddedObjectManager::getInstance()->registerObjects($this->parameters['htmlInputProcessor'], 'com.woltlab.wcf.conversation.message', $message->messageID)) { + if ($message->hasEmbeddedObjects != MessageEmbeddedObjectManager::getInstance()->registerObjects($this->parameters['htmlInputProcessor'])) { $message->update(['hasEmbeddedObjects' => ($message->hasEmbeddedObjects ? 0 : 1)]); } } diff --git a/files/lib/system/worker/ConversationMessageRebuildDataWorker.class.php b/files/lib/system/worker/ConversationMessageRebuildDataWorker.class.php index 70dead5..65c6ef0 100644 --- a/files/lib/system/worker/ConversationMessageRebuildDataWorker.class.php +++ b/files/lib/system/worker/ConversationMessageRebuildDataWorker.class.php @@ -3,6 +3,7 @@ namespace wcf\system\worker; use wcf\data\conversation\message\ConversationMessageEditor; use wcf\data\conversation\message\ConversationMessageList; use wcf\data\object\type\ObjectTypeCache; +use wcf\system\exception\SystemException; use wcf\system\message\embedded\object\MessageEmbeddedObjectManager; use wcf\system\search\SearchIndexManager; use wcf\system\WCF; @@ -81,7 +82,8 @@ class ConversationMessageRebuildDataWorker extends AbstractRebuildDataWorker { $data['attachments'] = $row['attachments']; // update embedded objects - $data['hasEmbeddedObjects'] = (MessageEmbeddedObjectManager::getInstance()->registerObjects('com.woltlab.wcf.conversation.message', $message->messageID, $message->message) ? 1 : 0); + throw new SystemException("TODO: we need the html input processor here"); + $data['hasEmbeddedObjects'] = (MessageEmbeddedObjectManager::getInstance()->registerObjects('com.woltlab.wcf.conversation.message') ? 1 : 0); $editor->update($data); }