/**
  * @see Page::readParameters()
  */
 public function readParameters()
 {
     MessageForm::readParameters();
     if (isset($_REQUEST['threadID'])) {
         $this->threadID = intval($_REQUEST['threadID']);
     }
     if (isset($_REQUEST['postID'])) {
         $this->postID = intval($_REQUEST['postID']);
     }
     if (isset($_REQUEST['action'])) {
         $this->action = $_REQUEST['action'];
     }
     // get thread
     $this->thread = new ThreadEditor($this->threadID, null, $this->postID);
     $this->threadID = $this->thread->threadID;
     // get board
     $this->board = new BoardEditor($this->thread->boardID);
     // check permissions
     $this->thread->enter($this->board);
     if (!$this->thread->canReplyThread($this->board)) {
         throw new PermissionDeniedException();
     }
     // check double posts
     if (WCF::getUser()->getPermission('user.board.doublePostLock') != 0 && WCF::getUser()->userID && WCF::getUser()->userID == $this->thread->lastPosterID) {
         if (WCF::getUser()->getPermission('user.board.doublePostLock') == -1) {
             throw new NamedUserException(WCF::getLanguage()->get('wbb.postAdd.error.doublePostLock'));
         } else {
             if ($this->thread->lastPostTime >= TIME_NOW - WCF::getUser()->getPermission('user.board.doublePostLock') * 60) {
                 throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wbb.postAdd.error.doublePostLockTime', array('timeout' => WCF::getUser()->getPermission('user.board.doublePostLock'))));
             }
         }
     }
     $this->messageTable = "wbb" . WBB_N . "_post";
 }