Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[454] Another change related to [447] revision.

  • Loading branch information...
commit fd7a8328d4eea53ff12cf1eb6c02327a2906fe17 1 parent 42df9a6
@Shadez authored
Showing with 28 additions and 10 deletions.
  1. +1 −1  includes/revision_nr.php
  2. +27 −9 item-info.php
View
2  includes/revision_nr.php
@@ -1,5 +1,5 @@
<?php
-define('ARMORY_REVISION', 453);
+define('ARMORY_REVISION', 454);
define('DB_VERSION', 'armory_r434');
define('CONFIG_VERSION', '2812201001');
?>
View
36 item-info.php
@@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release 4.50
- * @revision 450
+ * @revision 454
* @copyright (c) 2009-2011 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
@@ -146,22 +146,40 @@
if($creature_loot = $items->BuildLootTable($itemID, 'creature')) {
$xml->XMLWriter()->startElement('dropCreatures');
foreach($creature_loot as $creature_item) {
- $xml->XMLWriter()->startElement('creature');
- foreach($creature_item as $c_item_key => $c_item_value) {
- $xml->XMLWriter()->writeAttribute($c_item_key, $c_item_value);
+ if(Utils::IsWriteRaw()) {
+ $xml->XMLWriter()->writeRaw('<creature ');
+ foreach($creature_item as $c_item_key => $c_item_value) {
+ $xml->XMLWriter()->writeRaw(sprintf(' %s="%s"', $c_item_key, (preg_match('/url/', strtolower($c_item_key))) ? str_replace('&', '&amp;', $c_item_value) : $c_item_value));
+ }
+ $xml->XMLWriter()->writeRaw(' />');
+ }
+ else {
+ $xml->XMLWriter()->startElement('creature');
+ foreach($creature_item as $c_item_key => $c_item_value) {
+ $xml->XMLWriter()->writeAttribute($c_item_key, $c_item_value);
+ }
+ $xml->XMLWriter()->endElement(); //creature
}
- $xml->XMLWriter()->endElement(); //creature
}
$xml->XMLWriter()->endElement(); //dropCreatures
}
if($gameobject_loot = $items->BuildLootTable($itemID, 'gameobject')) {
$xml->XMLWriter()->startElement('containerObjects');
foreach($gameobject_loot as $gameobject_item) {
- $xml->XMLWriter()->startElement('object');
- foreach($gameobject_item as $gobject_key => $gobject_value) {
- $xml->XMLWriter()->writeAttribute($gobject_key, $gobject_value);
+ if(Utils::IsWriteRaw()) {
+ $xml->XMLWriter()->writeRaw('<object ');
+ foreach($gameobject_item as $gobject_key => $gobject_value) {
+ $xml->XMLWriter()->writeRaw(sprintf('%s="%s" ', $gobject_key, (preg_match('/url/', strtolower($gobject_key))) ? str_replace('&', '&amp;', $gobject_value) : $gobject_value));
+ }
+ $xml->XMLWriter()->writeRaw(' />');
+ }
+ else {
+ $xml->XMLWriter()->startElement('object');
+ foreach($gameobject_item as $gobject_key => $gobject_value) {
+ $xml->XMLWriter()->writeAttribute($gobject_key, $gobject_value);
+ }
+ $xml->XMLWriter()->endElement(); //object
}
- $xml->XMLWriter()->endElement(); //object
}
$xml->XMLWriter()->endElement(); //containerObjects
}
Please sign in to comment.
Something went wrong with that request. Please try again.