Remove broken ConversationMessageAction::jumpToExtended()
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 22 Nov 2021 14:55:14 +0000 (15:55 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 22 Nov 2021 14:56:34 +0000 (15:56 +0100)
The target controllers for the forwarding no longer exist since
a3258a9f150a8febeef0f2c7d1899799d953e1cc.

see WoltLab/WCF#4575

files/lib/data/conversation/message/ConversationMessageAction.class.php

index 65ff994d99c8256e524170e44f83de75c186b7a4..b175868bbdaf487f21c074f250b7f03215a32c5b 100644 (file)
@@ -325,71 +325,6 @@ class ConversationMessageAction extends AbstractDatabaseObjectAction implements
         return $returnValues;
     }
 
-    /**
-     * @inheritDoc
-     */
-    public function validateJumpToExtended()
-    {
-        $this->readInteger('containerID');
-        $this->readString('message', true);
-        $this->readString('tmpHash', true);
-
-        $this->conversation = new Conversation($this->parameters['containerID']);
-        if (!$this->conversation->conversationID) {
-            throw new UserInputException('containerID');
-        } elseif (
-            $this->conversation->isClosed
-            || !Conversation::isParticipant([$this->conversation->conversationID])
-        ) {
-            throw new PermissionDeniedException();
-        }
-
-        // editing existing message
-        if (isset($this->parameters['messageID'])) {
-            $this->message = new ConversationMessage(\intval($this->parameters['messageID']));
-            if (!$this->message->messageID || ($this->message->conversationID != $this->conversation->conversationID)) {
-                throw new UserInputException('messageID');
-            }
-
-            if (!$this->message->canEdit()) {
-                throw new PermissionDeniedException();
-            }
-        }
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public function jumpToExtended()
-    {
-        // quick reply
-        if ($this->message === null) {
-            QuickReplyManager::getInstance()
-                ->setMessage('conversation', $this->conversation->conversationID, $this->parameters['message']);
-            $url = LinkHandler::getInstance()->getLink(
-                'ConversationMessageAdd',
-                ['id' => $this->conversation->conversationID]
-            );
-        } else {
-            // editing message
-            QuickReplyManager::getInstance()
-                ->setMessage('conversationMessage', $this->message->messageID, $this->parameters['message']);
-            $url = LinkHandler::getInstance()->getLink(
-                'ConversationMessageEdit',
-                ['id' => $this->message->messageID]
-            );
-        }
-
-        if (!empty($this->parameters['tmpHash'])) {
-            QuickReplyManager::getInstance()->setTmpHash($this->parameters['tmpHash']);
-        }
-
-        // redirect
-        return [
-            'url' => $url,
-        ];
-    }
-
     /**
      * @inheritDoc
      */