* first check if page to load exist in database, then in pages/ dir

This commit is contained in:
slawkens1 2017-09-29 22:33:25 +02:00
parent 4ac2fe27d5
commit 919f69ef46

View File

@ -170,9 +170,7 @@ if($load_it)
require(SYSTEM . 'compat_pages.php');
$ignore = false;
$file = SYSTEM . 'pages/' . $page . '.php';
if(!@file_exists($file))
{
$logged_access = 0;
if($logged && $account_logged && $account_logged->isLoaded()) {
$logged_access = $account_logged->getAccess();
@ -222,6 +220,9 @@ if($load_it)
$content .= $query['body']; // plain html
}
else
{
$file = SYSTEM . 'pages/' . $page . '.php';
if(!@file_exists($file))
{
$page = '404';
$file = SYSTEM . 'pages/404.php';