From 7133eb063257969c67acefbf35a9e337d69d2602 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 15 Jul 2016 15:38:22 +0200 Subject: [PATCH] Fixed usage of deprecated SearchIndexManager methods --- .../conversation/message/ConversationMessageAction.class.php | 4 ++-- .../worker/ConversationMessageRebuildDataWorker.class.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/lib/data/conversation/message/ConversationMessageAction.class.php b/files/lib/data/conversation/message/ConversationMessageAction.class.php index 6d7a6f7..3d6046e 100644 --- a/files/lib/data/conversation/message/ConversationMessageAction.class.php +++ b/files/lib/data/conversation/message/ConversationMessageAction.class.php @@ -144,7 +144,7 @@ class ConversationMessageAction extends AbstractDatabaseObjectAction implements UserStorageHandler::getInstance()->reset($conversation->getParticipantIDs(), 'unreadConversationCount'); // update search index - SearchIndexManager::getInstance()->add('com.woltlab.wcf.conversation.message', $message->messageID, $message->message, (!empty($this->parameters['isFirstPost']) ? $conversation->subject : ''), $message->time, $message->userID, $message->username); + SearchIndexManager::getInstance()->set('com.woltlab.wcf.conversation.message', $message->messageID, $message->message, (!empty($this->parameters['isFirstPost']) ? $conversation->subject : ''), $message->time, $message->userID, $message->username); // update attachments if (isset($this->parameters['attachmentHandler']) && $this->parameters['attachmentHandler'] !== null) { @@ -189,7 +189,7 @@ class ConversationMessageAction extends AbstractDatabaseObjectAction implements if (isset($this->parameters['data']) && isset($this->parameters['data']['message'])) { foreach ($this->getObjects() as $message) { $conversation = $message->getConversation(); - 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); + SearchIndexManager::getInstance()->set('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'])) { diff --git a/files/lib/system/worker/ConversationMessageRebuildDataWorker.class.php b/files/lib/system/worker/ConversationMessageRebuildDataWorker.class.php index 65c6ef0..8f7db90 100644 --- a/files/lib/system/worker/ConversationMessageRebuildDataWorker.class.php +++ b/files/lib/system/worker/ConversationMessageRebuildDataWorker.class.php @@ -71,7 +71,7 @@ class ConversationMessageRebuildDataWorker extends AbstractRebuildDataWorker { $attachmentStatement = WCF::getDB()->prepareStatement($sql); foreach ($this->objectList as $message) { - SearchIndexManager::getInstance()->add('com.woltlab.wcf.conversation.message', $message->messageID, $message->message, ($message->subject ?: ''), $message->time, $message->userID, $message->username); + SearchIndexManager::getInstance()->set('com.woltlab.wcf.conversation.message', $message->messageID, $message->message, ($message->subject ?: ''), $message->time, $message->userID, $message->username); $editor = new ConversationMessageEditor($message); $data = []; -- 2.20.1