Skip to content

Commit

Permalink
use exit_with_not_found() in page.php
Browse files Browse the repository at this point in the history
  • Loading branch information
atas committed Oct 13, 2023
1 parent 38ff6b9 commit fb00dee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

require_once "system/bootstrap.php";

// @var $page_meta PageMeta
global $page_meta;
$page_meta->selectedTab = "home";

Expand Down
4 changes: 1 addition & 3 deletions page.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
* If not, return 404.
*/
if (!preg_match('/^[a-zA-Z0-9\-]+$/', $_GET['page']) || !file_exists($md_path)) {
header('HTTP/1.0 404 Not Found');
include '404.php';
exit;
exit_with_not_found();
}

$tpl = get_markdown($md_path);
Expand Down

0 comments on commit fb00dee

Please sign in to comment.