From b06d1a5c2cfb1899d13635812a0fcb4bacec912b Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Mon, 20 Feb 2023 22:08:22 +0100 Subject: [PATCH] Pages/Caching (#380) * move localized option sorting to postCache() to prevent real order display in cached versions --- pages/achievements.php | 3 +++ pages/arenateams.php | 4 ++++ pages/guilds.php | 4 ++++ pages/items.php | 3 +++ pages/itemsets.php | 3 +++ pages/npcs.php | 3 +++ pages/profiles.php | 4 ++++ pages/sounds.php | 4 ++++ pages/spells.php | 3 +++ 9 files changed, 31 insertions(+) diff --git a/pages/achievements.php b/pages/achievements.php index 5f35a411..1aa1fdd6 100644 --- a/pages/achievements.php +++ b/pages/achievements.php @@ -116,7 +116,10 @@ class AchievementsPage extends GenericPage } $this->lvTabs[] = ['achievement', $tabData]; + } + protected function postCache() + { // sort for dropdown-menus in filter Lang::sort('game', 'si'); } diff --git a/pages/arenateams.php b/pages/arenateams.php index 9a7abe51..4bbb6492 100644 --- a/pages/arenateams.php +++ b/pages/arenateams.php @@ -114,7 +114,11 @@ class ArenaTeamsPage extends GenericPage } $this->lvTabs[] = ['profile', $tabData, 'membersCol']; + } + protected function postCache() + { + // sort for dropdown-menus Lang::sort('game', 'cl'); Lang::sort('game', 'ra'); } diff --git a/pages/guilds.php b/pages/guilds.php index a13d5256..402561b6 100644 --- a/pages/guilds.php +++ b/pages/guilds.php @@ -114,7 +114,11 @@ class GuildsPage extends GenericPage } $this->lvTabs[] = ['profile', $tabData, 'membersCol']; + } + protected function postCache() + { + // sort for dropdown-menus Lang::sort('game', 'cl'); Lang::sort('game', 'ra'); } diff --git a/pages/items.php b/pages/items.php index 99db56d3..5ef5a882 100644 --- a/pages/items.php +++ b/pages/items.php @@ -431,7 +431,10 @@ class ItemsPage extends GenericPage $this->forceTabs = false; $this->lvTabs[] = ['item', ['data' => []]]; } + } + protected function postCache() + { // sort for dropdown-menus Lang::sort('game', 'ra'); Lang::sort('game', 'cl'); diff --git a/pages/itemsets.php b/pages/itemsets.php index 67b5c03f..af93f910 100644 --- a/pages/itemsets.php +++ b/pages/itemsets.php @@ -72,7 +72,10 @@ class ItemsetsPage extends GenericPage $tabData['_errors'] = 1; $this->lvTabs[] = ['itemset', $tabData]; + } + protected function postCache() + { // sort for dropdown-menus Lang::sort('itemset', 'notes', SORT_NATURAL); Lang::sort('game', 'si'); diff --git a/pages/npcs.php b/pages/npcs.php index 96175e78..a3ea70de 100644 --- a/pages/npcs.php +++ b/pages/npcs.php @@ -91,7 +91,10 @@ class NpcsPage extends GenericPage $tabData['_errors'] = 1; $this->lvTabs[] = ['creature', $tabData]; + } + protected function postCache() + { // sort for dropdown-menus Lang::sort('game', 'fa'); } diff --git a/pages/profiles.php b/pages/profiles.php index 3b3132e7..6017fc7b 100644 --- a/pages/profiles.php +++ b/pages/profiles.php @@ -181,7 +181,11 @@ class ProfilesPage extends GenericPage $this->lvTabs[] = ['profile', $tabData]; + } + protected function postCache() + { + // sort for dropdown-menus Lang::sort('game', 'cl'); Lang::sort('game', 'ra'); } diff --git a/pages/sounds.php b/pages/sounds.php index 28948e48..d2e76a27 100644 --- a/pages/sounds.php +++ b/pages/sounds.php @@ -64,7 +64,11 @@ class SoundsPage extends GenericPage $tabData['_errors'] = 1; } $this->lvTabs[] = ['sound', $tabData]; + } + protected function postCache() + { + // sort for dropdown-menus Lang::sort('sound', 'cat'); } diff --git a/pages/spells.php b/pages/spells.php index 6e6073dd..779c2b1d 100644 --- a/pages/spells.php +++ b/pages/spells.php @@ -464,7 +464,10 @@ class SpellsPage extends GenericPage $tabData['hiddenCols'] = array_unique($hiddenCols); $this->lvTabs[] = ['spell', $tabData]; + } + protected function postCache() + { // sort for dropdown-menus Lang::sort('game', 'ra'); Lang::sort('game', 'cl');