function threadGet() { //gets Post $thread = ModelFacade::getThread($_GET["id"]); if ($thread == null) { $message = "Sorry a thread with that id does not exist"; include_once '/Views/ErrorPage.html'; } else { //Check if subcategory or parent category is disabled if (ModelFacade::checkSubcategoryDisabled($thread->subCatId)) { $message = "Sorry, but this thread is not enabled for viewing"; include_once '/Views/ErrorPage.html'; } else { //get Post Comments $comments = ModelFacade::getThreadComments($_GET["id"]); include_once '/Views/Thread.html'; } } }