diff --git a/includes/classes/class.search.php b/includes/classes/class.search.php index 646c8b22d..29e73b9dc 100644 --- a/includes/classes/class.search.php +++ b/includes/classes/class.search.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 443 + * @revision 447 * @copyright (c) 2009-2011 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -408,7 +408,7 @@ public function PerformAdvancedItemsSearch($count = false) { $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['id']); + $name['name'] = Items::GetItemName($name['entry']); } $names_holder[$name['entry']] = $name['name']; } diff --git a/includes/revision_nr.php b/includes/revision_nr.php index a747e69e1..bf2853d8e 100644 --- a/includes/revision_nr.php +++ b/includes/revision_nr.php @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/search.php b/search.php index 9ad638dec..4b4cafc92 100644 --- a/search.php +++ b/search.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 440 + * @revision 447 * @copyright (c) 2009-2011 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -174,10 +174,15 @@ break; } if(is_string($filter_get_key) && is_string($filter_get_value)) { - $xml->XMLWriter()->startElement('filter'); - $xml->XMLWriter()->writeAttribute('name', $filter_get_key); - $xml->XMLWriter()->writeAttribute('value', $filter_get_value); - $xml->XMLWriter()->endElement(); + if(Utils::IsWriteRaw()) { + $xml->XMLWriter()->writeRaw(''); + } + else { + $xml->XMLWriter()->startElement('filter'); + $xml->XMLWriter()->writeAttribute('name', $filter_get_key); + $xml->XMLWriter()->writeAttribute('value', $filter_get_value); + $xml->XMLWriter()->endElement(); + } } $filtersCount++; } @@ -245,11 +250,26 @@ $xml->XMLWriter()->writeAttribute($itemdata_key, $itemdata_value); } foreach($item['filters'] as $filter) { - $xml->XMLWriter()->startElement('filter'); + if(Utils::IsWriteRaw()) { + $xml->XMLWriter()->writeRaw('XMLWriter()->startElement('filter'); + } foreach($filter as $filter_key => $filter_value) { - $xml->XMLWriter()->writeAttribute($filter_key, $filter_value); + if(Utils::IsWriteRaw()) { + $xml->XMLWriter()->writeRaw(' ' . $filter_key . '="' . $filter_value . '"'); + } + else { + $xml->XMLWriter()->writeAttribute($filter_key, $filter_value); + } + } + if(Utils::IsWriteRaw()) { + $xml->XMLWriter()->writeRaw(' />'); //filter + } + else { + $xml->XMLWriter()->endElement(); //filter } - $xml->XMLWriter()->endElement(); //filter } $xml->XMLWriter()->endElement(); //item }