From 1ffd76486161d1fa8fd903df609da3de3a2eb42d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 3 Apr 2013 02:04:44 +0200 Subject: [PATCH] Improved quote system --- .../ConversationMessageAction.class.php | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/files/lib/data/conversation/message/ConversationMessageAction.class.php b/files/lib/data/conversation/message/ConversationMessageAction.class.php index 47bbd3f..1771665 100644 --- a/files/lib/data/conversation/message/ConversationMessageAction.class.php +++ b/files/lib/data/conversation/message/ConversationMessageAction.class.php @@ -434,4 +434,27 @@ class ConversationMessageAction extends AbstractDatabaseObjectAction implements 'fullQuoteMessageIDs' => MessageQuoteManager::getInstance()->getFullQuoteObjectIDs(array('com.woltlab.wcf.conversation.message')) ); } + + /** + * @see wcf\data\IMessageQuoteAction::validateGetRenderedQuotes() + */ + public function validateGetRenderedQuotes() { + $this->readInteger('parentObjectID'); + + $this->conversation = new Conversation($this->parameters['parentObjectID']); + if (!$this->conversation->conversationID) { + throw new UserInputException('parentObjectID'); + } + } + + /** + * @see wcf\data\IMessageQuoteAction::getRenderedQuotes() + */ + public function getRenderedQuotes() { + $quotes = MessageQuoteManager::getInstance()->getQuotesByParentObjectID('com.woltlab.wbb.conversation.message', $this->conversation->conversationID); + + return array( + 'template' => implode("\n\n", $quotes) + ); + } } -- 2.20.1