diff --git a/check.php b/check.php index 3c5c500..771d6a7 100644 --- a/check.php +++ b/check.php @@ -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 "
"; diff --git a/history.php b/history.php index b7e254f..2415089 100644 --- a/history.php +++ b/history.php @@ -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']; } } diff --git a/inc/page.php b/inc/page.php index 6d9908d..b9fbf8b 100644 --- a/inc/page.php +++ b/inc/page.php @@ -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, ); } }