/** * Reads the given parameters. */ public function readParameters() { parent::readParameters(); if (isset($_REQUEST['threadID'])) { $this->threadID = intval($_REQUEST['threadID']); } else { if (isset($_REQUEST['threadid'])) { $this->threadID = intval($_REQUEST['threadid']); } } // wbb2 style if (isset($_REQUEST['messageID'])) { $this->postID = intval($_REQUEST['messageID']); } else { if (isset($_REQUEST['postID'])) { $this->postID = intval($_REQUEST['postID']); } else { if (isset($_REQUEST['postid'])) { $this->postID = intval($_REQUEST['postid']); } } } // wbb2 style if (isset($_REQUEST['action'])) { $this->action = $_REQUEST['action']; } if (isset($_REQUEST['highlight'])) { $this->highlight = $_REQUEST['highlight']; } // get thread $this->thread = new ViewableThread($this->threadID, null, $this->postID); $this->threadID = $this->thread->threadID; // get board $this->board = Board::getBoard($this->thread->boardID); if ($this->board->postSortOrder) { $this->sortOrder = $this->board->postSortOrder; } if ($this->board->enableRating != -1) { $this->enableRating = $this->board->enableRating; } // posts per page if ($this->board->postsPerPage) { $this->itemsPerPage = $this->board->postsPerPage; } if (WCF::getUser()->postsPerPage) { $this->itemsPerPage = WCF::getUser()->postsPerPage; } // enter thread $this->thread->enter($this->board); // init post list $this->postList = new ThreadPostList($this->thread, $this->board); $this->postList->sqlOrderBy = 'post.time ' . $this->sortOrder; // handle jump to if ($this->action == 'lastPost') { $this->goToLastPost(); } if ($this->action == 'firstNew') { $this->goToFirstNewPost(); } if ($this->postID) { $this->goToPost(); } // handle subscriptions if (WCF::getUser()->userID) { $this->thread->updateSubscription(); if ($this->thread->subscribed) { WCF::getSession()->unregister('lastSubscriptionsStatusUpdateTime'); } } // handle parameters and special actions $this->handleRating(); }