mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Fix redirection on non-English locales
This commit is contained in:
parent
f8318961ed
commit
355a40727d
@ -29,8 +29,8 @@ class Check {
|
|||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
// sanitize $_POST['table'] ($from)
|
// sanitize $_POST['table'] ($from)
|
||||||
$from_type = $page->type_info($from);
|
$info = $page->type_info($from);
|
||||||
$type = $from_type['type'];
|
$type = $info['type'];
|
||||||
|
|
||||||
if (!isset($uuid)) {
|
if (!isset($uuid)) {
|
||||||
if (filter_var($name, FILTER_VALIDATE_FLOAT)) {
|
if (filter_var($name, FILTER_VALIDATE_FLOAT)) {
|
||||||
@ -46,7 +46,7 @@ class Check {
|
|||||||
$href = "history.php?uuid=$uuid";
|
$href = "history.php?uuid=$uuid";
|
||||||
|
|
||||||
if ($type !== null) {
|
if ($type !== null) {
|
||||||
$href .= "&from=" . Page::lc_first($from_type['title']);
|
$href .= "&from=$type";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
|
@ -99,7 +99,7 @@ if (isset($_GET['from'])) {
|
|||||||
if ($info['type'] !== null) {
|
if ($info['type'] !== null) {
|
||||||
$from_title = $info['title'];
|
$from_title = $info['title'];
|
||||||
$from = Page::lc_first($from_title);
|
$from = Page::lc_first($from_title);
|
||||||
$from_href = "$from.php";
|
$from_href = $info['page'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +95,7 @@ class Page {
|
|||||||
"type" => "ban",
|
"type" => "ban",
|
||||||
"table" => $settings->table['bans'],
|
"table" => $settings->table['bans'],
|
||||||
"title" => $this->t("title.bans"),
|
"title" => $this->t("title.bans"),
|
||||||
|
"page" => "bans.php",
|
||||||
);
|
);
|
||||||
case "mute":
|
case "mute":
|
||||||
case "mutes":
|
case "mutes":
|
||||||
@ -102,6 +103,7 @@ class Page {
|
|||||||
"type" => "mute",
|
"type" => "mute",
|
||||||
"table" => $settings->table['mutes'],
|
"table" => $settings->table['mutes'],
|
||||||
"title" => $this->t("title.mutes"),
|
"title" => $this->t("title.mutes"),
|
||||||
|
"page" => "mutes.php",
|
||||||
);
|
);
|
||||||
case "warn":
|
case "warn":
|
||||||
case "warnings":
|
case "warnings":
|
||||||
@ -109,6 +111,7 @@ class Page {
|
|||||||
"type" => "warn",
|
"type" => "warn",
|
||||||
"table" => $settings->table['warnings'],
|
"table" => $settings->table['warnings'],
|
||||||
"title" => $this->t("title.warnings"),
|
"title" => $this->t("title.warnings"),
|
||||||
|
"page" => "warnings.php",
|
||||||
);
|
);
|
||||||
case "kick":
|
case "kick":
|
||||||
case "kicks":
|
case "kicks":
|
||||||
@ -116,12 +119,14 @@ class Page {
|
|||||||
"type" => "kick",
|
"type" => "kick",
|
||||||
"table" => $settings->table['kicks'],
|
"table" => $settings->table['kicks'],
|
||||||
"title" => $this->t("title.kicks"),
|
"title" => $this->t("title.kicks"),
|
||||||
|
"page" => "kicks.php",
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
return array(
|
return array(
|
||||||
"type" => null,
|
"type" => null,
|
||||||
"table" => null,
|
"table" => null,
|
||||||
"title" => null,
|
"title" => null,
|
||||||
|
"page" => null,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user