Skip to content

Commit

Permalink
Don't show draft pages.
Browse files Browse the repository at this point in the history
Signed-off-by: Mariusz Fik <mariusz@fidano.pl>
  • Loading branch information
Fisiu committed May 4, 2018
1 parent c59bf4c commit ae7b78f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modules/Page/Http/Controllers/PublicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ private function getTemplateForPage($page)
}

/**
* Throw a 404 error page if the given page is not found
* Throw a 404 error page if the given page is not found or draft
* @param $page
*/
private function throw404IfNotFound($page)
{
if (is_null($page)) {
if ($page->status == 0 || is_null($page)) {
$this->app->abort('404');
}
}
Expand Down

0 comments on commit ae7b78f

Please sign in to comment.