From a497a7196e996f61e31643f65a25eb2fe80fd0c9 Mon Sep 17 00:00:00 2001 From: Shadez Date: Fri, 11 Feb 2011 14:03:17 +0800 Subject: [PATCH] [472] Correct SQL query for enGB locale in SearchMgr::PerformAdvancedItemsSearch(). --- includes/classes/class.search.php | 9 +++++++-- includes/revision_nr.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/includes/classes/class.search.php b/includes/classes/class.search.php index dd0b73a42..e0e343c5a 100644 --- a/includes/classes/class.search.php +++ b/includes/classes/class.search.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release 4.50 - * @revision 450 + * @revision 472 * @copyright (c) 2009-2011 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -405,7 +405,12 @@ public function PerformAdvancedItemsSearch($count = false) { foreach($tmp_icons_holder as $icon) { $icons_holder[$icon['displayid']] = $icon['icon']; } - $tmp_names_holder = Armory::$wDB->select("SELECT `entry`, `name_loc%d` AS `name` FROM `locales_item` WHERE `entry` IN (%s)", Armory::GetLoc(), $names_to_add); + if(Armory::GetLoc() == 0) { + $tmp_names_holder = Armory::$wDB->select("SELECT `entry`, `name` AS `name` FROM `item_template` WHERE `entry` IN (%s)", Armory::GetLoc(), $names_to_add); + } + else { + $tmp_names_holder = Armory::$wDB->select("SELECT `entry`, `name_loc%d` AS `name` FROM `locales_item` WHERE `entry` IN (%s)", Armory::GetLoc(), $names_to_add); + } foreach($tmp_names_holder as $name) { if($name['name'] == null) { $name['name'] = Items::GetItemName($name['entry']); diff --git a/includes/revision_nr.php b/includes/revision_nr.php index 96be3bd4c..10a21a5f0 100644 --- a/includes/revision_nr.php +++ b/includes/revision_nr.php @@ -1,5 +1,5 @@ \ No newline at end of file