From a5ce57ddf829e481ea40b0f4967cd86b12ffd7e2 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Mon, 8 Sep 2014 19:31:53 +0200 Subject: [PATCH] Misc - allow 0 (mis Spells) as valid pageParam - set lcoale before creating featuredBox on homepage (fixes links) - set iconStrings in DB to lowercase for Linux compatibility (thx @zackbcom) --- pages/spells.php | 2 +- setup/updates/05_iconStringCase.sql | 9 +++++++++ template/bricks/pageTemplate.tpl.php | 2 +- template/pages/home.tpl.php | 7 ++++++- 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 setup/updates/05_iconStringCase.sql diff --git a/pages/spells.php b/pages/spells.php index 4dfd18ad..0b03e496 100644 --- a/pages/spells.php +++ b/pages/spells.php @@ -91,7 +91,7 @@ class SpellsPage extends GenericPage parent::__construct($pageCall, $pageParam); $this->name = Util::ucFirst(Lang::$game['spells']); - $this->subCat = $pageParam ? '='.$pageParam : ''; + $this->subCat = $pageParam !== null ? '='.$pageParam : ''; $this->filter = ['classPanel' => false, 'glyphPanel' => false]; } diff --git a/setup/updates/05_iconStringCase.sql b/setup/updates/05_iconStringCase.sql new file mode 100644 index 00000000..23a67ab4 --- /dev/null +++ b/setup/updates/05_iconStringCase.sql @@ -0,0 +1,9 @@ +UPDATE aowow_achievement SET iconString = LOWER(iconString); +UPDATE aowow_creature SET iconString = LOWER(iconString); +UPDATE aowow_currencies SET iconString = LOWER(iconString); +UPDATE aowow_holidays SET iconString = LOWER(iconString); +UPDATE aowow_items SET iconString = LOWER(iconString); +UPDATE aowow_pet SET iconString = LOWER(iconString); +UPDATE aowow_shapeshiftforms SET iconString = LOWER(iconString); +UPDATE aowow_skillline SET iconString = LOWER(iconString); +UPDATE aowow_spell SET iconString = LOWER(iconString); diff --git a/template/bricks/pageTemplate.tpl.php b/template/bricks/pageTemplate.tpl.php index a3f78c4e..9fa15ba9 100644 --- a/template/bricks/pageTemplate.tpl.php +++ b/template/bricks/pageTemplate.tpl.php @@ -16,7 +16,7 @@ if (!empty($this->gPageInfo)): endif; if (!empty($this->pageTemplate)): - if (User::$localeId): + if (User::$localeId && $this->pageTemplate['pageName'] != 'home'): echo " Locale.set(".User::$localeId.");\n"; endif; diff --git a/template/pages/home.tpl.php b/template/pages/home.tpl.php index d1ccdb07..c8e9d6b8 100644 --- a/template/pages/home.tpl.php +++ b/template/pages/home.tpl.php @@ -38,7 +38,12 @@