Unverified Commit 332b39a1 authored by Nicolas Widart's avatar Nicolas Widart Committed by GitHub

Merge pull request #526 from Fisiu/draft-pages

Don't show draft pages.
parents 7db10886 ae7b78f6
......@@ -84,12 +84,12 @@ class PublicController extends BasePublicController
}
/**
* 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');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment