Commit ae7b78f6 authored by Mariusz Fik's avatar Mariusz Fik

Don't show draft pages.

Signed-off-by: 's avatarMariusz Fik <mariusz@fidano.pl>
parent c59bf4c7
......@@ -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