mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 08:29:06 +00:00
#68: Use absolute path for default name_link
This commit is contained in:
parent
b164f6e722
commit
15635939b9
@ -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'];
|
||||
|
@ -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") {
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user