From 9ee6906e4d819666c7509921c8f504a98a63ca9d Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Mon, 20 Nov 2017 17:48:25 +0100 Subject: [PATCH] * fixed loading of custom pages --- index.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 4b33b74dff..124d9cf943 100644 --- a/index.php +++ b/index.php @@ -144,10 +144,16 @@ // define page visited, so it can be used within events system $page = isset($_REQUEST['subtopic']) ? $_REQUEST['subtopic'] : (isset($_REQUEST['p']) ? $_REQUEST['p'] : ''); if(empty($page) || !preg_match('/^[A-z0-9\_\-]+$/', $page)) { - if(!$found) - $page = '404'; - else - $page = 'news'; + $tmp = URI; + if(!empty($tmp)) { + $page = $tmp; + } + else { + if(!$found) + $page = '404'; + else + $page = 'news'; + } } $page = strtolower($page);