diff --git a/inc/header.php b/inc/header.php index b13dcaa..518897f 100644 --- a/inc/header.php +++ b/inc/header.php @@ -37,6 +37,10 @@ function navbar($links) { function print_header() { $page = $this->page; $settings = $page->settings; + +if ($page->settings->name_link === "index.php") { + $page->settings->name_link = $page->link("index.php"); +} if ($page->settings->header_show_totals) { $t = $page->settings->table; $t_bans = $t['bans']; diff --git a/inc/settings.php b/inc/settings.php index f4b888b..dbca4d9 100644 --- a/inc/settings.php +++ b/inc/settings.php @@ -143,10 +143,6 @@ class Settings { ini_set("display_errors", 1); } - if ($this->simple_urls && $this->name_link === "index.php") { - $this->name_link = "../index/"; - } - $this->active_query = ""; if ($this->driver === "pgsql") { diff --git a/index.php b/index.php index 691b8f7..d6fe93d 100644 --- a/index.php +++ b/index.php @@ -5,6 +5,7 @@ $page = new Page("index",false); if ($page->settings->simple_urls && count($_GET) !== 0) { $target = $page->get_requested_page(); + if ($target !== "index" && strlen($target) <= 16 && preg_match("/^[a-z]+$/", $target)) { $local_script = "./${target}.php"; if (file_exists($local_script)) {