Skip to content

Commit

Permalink
* fixed loading of custom pages
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed Nov 20, 2017
1 parent be38f51 commit 9ee6906
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9ee6906

Please sign in to comment.