/**
  * @see	\wcf\form\IPage::readParameters()
  */
 public function readParameters()
 {
     MessageForm::readParameters();
     if (isset($_REQUEST['id'])) {
         $this->messageID = intval($_REQUEST['id']);
     }
     $this->message = new ConversationMessage($this->messageID);
     if (!$this->message->messageID) {
         throw new IllegalLinkException();
     }
     if (!$this->message->canEdit()) {
         throw new PermissionDeniedException();
     }
     // get conversation
     $this->conversationID = $this->message->conversationID;
     $this->conversation = $this->message->getConversation();
     if ($this->conversation->firstMessageID == $this->message->messageID) {
         $this->isFirstMessage = true;
     }
     // set attachment object id
     $this->attachmentObjectID = $this->message->messageID;
 }
 /**
  * @see	\wcf\data\IMessageInlineEditorAction::validateBeginEdit()
  */
 public function validateBeginEdit()
 {
     $this->readInteger('containerID');
     $this->readInteger('objectID');
     $this->conversation = new Conversation($this->parameters['containerID']);
     if (!$this->conversation->conversationID) {
         throw new UserInputException('containerID');
     }
     if ($this->conversation->isClosed || !Conversation::isParticipant(array($this->conversation->conversationID))) {
         throw new PermissionDeniedException();
     }
     $this->message = new ConversationMessage($this->parameters['objectID']);
     if (!$this->message->messageID) {
         throw new UserInputException('objectID');
     }
     if (!$this->message->canEdit()) {
         throw new PermissionDeniedException();
     }
 }