Skip to content

Commit

Permalink
[149] Declare tabUrl variable to disable notices if character does no…
Browse files Browse the repository at this point in the history
…t exists.
  • Loading branch information
Shadez committed Apr 18, 2010
1 parent 06eaf03 commit b4043d4
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 11 deletions.
13 changes: 8 additions & 5 deletions character-achievements.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 147
* @revision 149
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -159,6 +159,7 @@
}

/** Basic info **/
$tabUrl = false;
$guilds->guid = $characters->guid;
if($isCharacter && $guilds->extractPlayerGuildId()) {
$tabUrl = sprintf('r=%s&cn=%s&gn=%s', urlencode($armory->armoryconfig['defaultRealmName']), urlencode($characters->name), urlencode($guilds->getGuildName()));
Expand Down Expand Up @@ -246,11 +247,13 @@
$last_achievements = $achievements->GetLastAchievements();
if(is_array($last_achievements)) {
foreach($last_achievements as $l_achievement) {
$xml->XMLWriter()->startElement('achievement');
foreach($l_achievement as $l_a_key => $l_a_value) {
$xml->XMLWriter()->writeAttribute($l_a_key, $l_a_value);
if(is_array($l_achievement)) {
$xml->XMLWriter()->startElement('achievement');
foreach($l_achievement as $l_a_key => $l_a_value) {
$xml->XMLWriter()->writeAttribute($l_a_key, $l_a_value);
}
$xml->XMLWriter()->endElement(); //achievement
}
$xml->XMLWriter()->endElement(); //achievement
}
}
$xml->XMLWriter()->endElement(); //summary
Expand Down
3 changes: 2 additions & 1 deletion character-arenateams.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 147
* @revision 149
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -57,6 +57,7 @@
$achievements->guid = $characters->guid;
$guilds->guid = $characters->guid;
$arenateams->guid = $characters->guid;
$tabUrl = false;
if($isCharacter && $guilds->extractPlayerGuildId()) {
$tabUrl = sprintf('r=%s&cn=%s&gn=%s', urlencode($armory->armoryconfig['defaultRealmName']), urlencode($characters->name), urlencode($guilds->getGuildName()));
$charTabUrl = sprintf('r=%s&cn=%s&gn=%s', urlencode($armory->armoryconfig['defaultRealmName']), urlencode($characters->name), urlencode($guilds->getGuildName()));
Expand Down
3 changes: 2 additions & 1 deletion character-calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 147
* @revision 149
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -53,6 +53,7 @@
}
}
/** Basic info **/
$tabUrl = false;
$guilds->guid = $characters->guid;
if($isCharacter && $guilds->extractPlayerGuildId()) {
$tabUrl = sprintf('r=%s&cn=%s&gn=%s', urlencode($armory->armoryconfig['defaultRealmName']), urlencode($characters->name), urlencode($guilds->getGuildName()));
Expand Down
3 changes: 2 additions & 1 deletion character-reputation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 147
* @revision 149
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -55,6 +55,7 @@
// Load XSLT template
$xml->LoadXSLT('character/reputation.xsl');
/** Basic info **/
$tabUrl = false;
$guilds->guid = $characters->guid;
if($isCharacter && $guilds->extractPlayerGuildId()) {
$tabUrl = sprintf('r=%s&cn=%s&gn=%s', urlencode($armory->armoryconfig['defaultRealmName']), urlencode($characters->name), urlencode($guilds->getGuildName()));
Expand Down
3 changes: 2 additions & 1 deletion character-sheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 147
* @revision 149
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -60,6 +60,7 @@
$achievements->guid = $characters->guid;
$guilds->guid = $characters->guid;
$arenateams->guid = $characters->guid;
$tabUrl = false;
if($isCharacter && $guilds->extractPlayerGuildId()) {
$tabUrl = sprintf('r=%s&cn=%s&gn=%s', urlencode($armory->armoryconfig['defaultRealmName']), urlencode($characters->name), urlencode($guilds->getGuildName()));
$charTabUrl = sprintf('r=%s&cn=%s&gn=%s', urlencode($armory->armoryconfig['defaultRealmName']), urlencode($characters->name), urlencode($guilds->getGuildName()));
Expand Down
3 changes: 2 additions & 1 deletion character-statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 147
* @revision 149
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -96,6 +96,7 @@
}

/** Basic info **/
$tabUrl = false;
$guilds->guid = $characters->guid;
if($isCharacter && $guilds->extractPlayerGuildId()) {
$tabUrl = sprintf('r=%s&cn=%s&gn=%s', urlencode($armory->armoryconfig['defaultRealmName']), urlencode($characters->name), urlencode($guilds->getGuildName()));
Expand Down
3 changes: 2 additions & 1 deletion character-talents.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 147
* @revision 149
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -56,6 +56,7 @@
$characters->_structCharacter();
$achievements->guid = $characters->guid;
$guilds->guid = $characters->guid;
$tabUrl = false;
if($isCharacter && $guilds->extractPlayerGuildId()) {
$tabUrl = sprintf('r=%s&cn=%s&gn=%s', urlencode($armory->armoryconfig['defaultRealmName']), urlencode($characters->name), urlencode($guilds->getGuildName()));
$charTabUrl = sprintf('r=%s&cn=%s&gn=%s', urlencode($armory->armoryconfig['defaultRealmName']), urlencode($characters->name), urlencode($guilds->getGuildName()));
Expand Down

0 comments on commit b4043d4

Please sign in to comment.