mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +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() {
|
function print_header() {
|
||||||
$page = $this->page;
|
$page = $this->page;
|
||||||
$settings = $page->settings;
|
$settings = $page->settings;
|
||||||
|
|
||||||
|
if ($page->settings->name_link === "index.php") {
|
||||||
|
$page->settings->name_link = $page->link("index.php");
|
||||||
|
}
|
||||||
if ($page->settings->header_show_totals) {
|
if ($page->settings->header_show_totals) {
|
||||||
$t = $page->settings->table;
|
$t = $page->settings->table;
|
||||||
$t_bans = $t['bans'];
|
$t_bans = $t['bans'];
|
||||||
|
@ -143,10 +143,6 @@ class Settings {
|
|||||||
ini_set("display_errors", 1);
|
ini_set("display_errors", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->simple_urls && $this->name_link === "index.php") {
|
|
||||||
$this->name_link = "../index/";
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->active_query = "";
|
$this->active_query = "";
|
||||||
|
|
||||||
if ($this->driver === "pgsql") {
|
if ($this->driver === "pgsql") {
|
||||||
|
@ -5,6 +5,7 @@ $page = new Page("index",false);
|
|||||||
|
|
||||||
if ($page->settings->simple_urls && count($_GET) !== 0) {
|
if ($page->settings->simple_urls && count($_GET) !== 0) {
|
||||||
$target = $page->get_requested_page();
|
$target = $page->get_requested_page();
|
||||||
|
|
||||||
if ($target !== "index" && strlen($target) <= 16 && preg_match("/^[a-z]+$/", $target)) {
|
if ($target !== "index" && strlen($target) <= 16 && preg_match("/^[a-z]+$/", $target)) {
|
||||||
$local_script = "./${target}.php";
|
$local_script = "./${target}.php";
|
||||||
if (file_exists($local_script)) {
|
if (file_exists($local_script)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user