From 6bac02bd35b8661aa1a064f54a9167850c470663 Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 30 Jan 2024 18:09:20 +0100 Subject: [PATCH] Fix links to some pages that has been renamed --- system/compat/pages.php | 2 +- system/template.php | 7 ++++--- templates/kathrine/menus.php | 8 ++++---- templates/tibiacom/menus.php | 8 ++++---- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/system/compat/pages.php b/system/compat/pages.php index 5857322d..cb90d62f 100644 --- a/system/compat/pages.php +++ b/system/compat/pages.php @@ -44,7 +44,7 @@ switch($page) break; case 'killstatistics': - $page = 'lastkills'; + $page = 'last-kills'; break; case 'buypoints': diff --git a/system/template.php b/system/template.php index c87d91d1..8b419295 100644 --- a/system/template.php +++ b/system/template.php @@ -114,9 +114,10 @@ $template['link_account_logout'] = getLink('account/logout'); $template['link_news_archive'] = getLink('news/archive'); -$links = array('news', 'changelog', 'rules', 'downloads', 'characters', 'online', 'highscores', 'powergamers', 'lastkills', 'houses', 'guilds', 'wars', 'polls', 'bans', 'team', 'creatures', 'spells', 'commands', 'experienceStages', 'freeHouses', 'serverInfo', 'experienceTable', 'faq', 'points', 'gifts', 'bugtracker', 'gallery'); -foreach($links as $link) { - $template['link_' . $link] = getLink($link); +$links = array('news', 'changelog', 'rules', 'downloads', 'characters', 'online', 'highscores', 'powergamers', 'lastkills' => 'last-kills', 'houses', 'guilds', 'wars', 'polls', 'bans', 'team', 'creatures', 'spells', 'commands', 'exp-stages', 'freeHouses', 'serverInfo', 'exp-table', 'faq', 'points', 'gifts', 'bugtracker', 'gallery'); +foreach($links as $key => $value) { + $key = is_string($key) ? $key : $value; + $template['link_' . $key] = getLink($value); } $template['link_screenshots'] = getLink('gallery'); diff --git a/templates/kathrine/menus.php b/templates/kathrine/menus.php index 1a188a1c..e6b2bfbf 100644 --- a/templates/kathrine/menus.php +++ b/templates/kathrine/menus.php @@ -17,7 +17,7 @@ return [ 'Characters' => 'characters', 'Who is Online?' => 'online', 'Highscores' => 'highscores', - 'Last Kills' => 'lastkills', + 'Last Kills' => 'last-kills', 'Houses' => 'houses', 'Guilds' => 'guilds', 'Polls' => 'polls', @@ -28,11 +28,11 @@ return [ MENU_CATEGORY_LIBRARY => [ 'Monsters' => 'creatures', 'Spells' => 'spells', - 'Server Info' => 'serverInfo', + 'Server Info' => 'server-info', 'Commands' => 'commands', - 'Exp Stages' => 'experienceStages', + 'Exp Stages' => 'exp-stages', 'Gallery' => 'gallery', - 'Exp Table' => 'experienceTable', + 'Exp Table' => 'exp-table', 'FAQ' => 'faq', ], MENU_CATEGORY_SHOP => [ diff --git a/templates/tibiacom/menus.php b/templates/tibiacom/menus.php index a9cd42f4..b89e5559 100644 --- a/templates/tibiacom/menus.php +++ b/templates/tibiacom/menus.php @@ -17,7 +17,7 @@ return [ 'Characters' => 'characters', 'Who is Online?' => 'online', 'Highscores' => 'highscores', - 'Last Kills' => 'lastkills', + 'Last Kills' => 'last-kills', 'Houses' => 'houses', 'Guilds' => 'guilds', 'Polls' => 'polls', @@ -31,10 +31,10 @@ return [ 'Monsters' => 'creatures', 'Spells' => 'spells', 'Commands' => 'commands', - 'Exp Stages' => 'experienceStages', + 'Exp Stages' => 'exp-stages', 'Gallery' => 'gallery', - 'Server Info' => 'serverInfo', - 'Exp Table' => 'experienceTable', + 'Server Info' => 'server-info', + 'Exp Table' => 'exp-table', 'FAQ' => 'faq', ], MENU_CATEGORY_SHOP => [