mirror of
https://github.com/slawkens/myaac.git
synced 2025-06-12 15:54:29 +02:00
* first check if page to load exist in database, then in pages/ dir
This commit is contained in:
parent
4ac2fe27d5
commit
919f69ef46
@ -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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user