/** * Display discussion page starting with a particular comment. * * @since 2.0.0 * @access public * * @param int $CommentID Unique comment ID */ public function comment($CommentID) { // Get the discussionID $Comment = $this->CommentModel->getID($CommentID); if (!$Comment) { throw notFoundException('Comment'); } $DiscussionID = $Comment->DiscussionID; // Figure out how many comments are before this one $Offset = $this->CommentModel->getOffset($Comment); $Limit = Gdn::config('Vanilla.Comments.PerPage', 30); $PageNumber = pageNumber($Offset, $Limit, true); $this->setData('Page', $PageNumber); $this->View = 'index'; $this->index($DiscussionID, 'x', $PageNumber); }