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