Skip to content

Commit

Permalink
[214] New full DB SQL dump (content of armory_bookmarks, `armory_lo…
Browse files Browse the repository at this point in the history
…gin_characters` and `armory_realm_data` will be dropped)
  • Loading branch information
Shadez committed May 26, 2010
1 parent 22ae760 commit 11b43df
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 25 deletions.
28 changes: 18 additions & 10 deletions includes/armory_loader.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 198
* @revision 214
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand All @@ -30,14 +30,14 @@
if(!@include('classes/class.connector.php')) {
die('<b>Error:</b> can not load connector class!');
}
define('DB_VERSION', 'armory_r198');
define('ARMORY_REVISION', 198);
$armory = new Connector;
define('DB_VERSION', 'armory_r214');
define('ARMORY_REVISION', 214);
$armory = new Connector();
/* Check DbVersion */
$dbVersion = $armory->aDB->selectCell("SELECT `version` FROM `armory_db_version`");
if($dbVersion != DB_VERSION) {
if(empty($dbVersion)) {
echo '<b>Fatal error</b>: incorrect Armory DB name<br/>';
echo '<b>Fatal error</b>: incorrect Armory DB name<br/>';
}
die(sprintf('<b>DbVersion error</b>: current version is %s but expected %s.', $dbVersion, DB_VERSION));
}
Expand All @@ -51,16 +51,18 @@
if(!@include('defines.php')) {
die('<b>Error:</b> can not load defines.php!');
}
if(!@include('classes/class.utils.php')) {
die('<b>Error:</b> can not load utils class!');
}

$utils = new Utils;
if(!defined('skip_utils_class')) {
if(!@include('classes/class.utils.php')) {
die('<b>Error:</b> can not load utils class!');
}
$utils = new Utils;
}
/** Login **/
if(isset($_GET['login']) && $_GET['login'] == 1) {
header('Location: login.xml');
}
elseif(isset($_GET['logout']) && $_GET['logout'] == 1) {
elseif(isset($_GET['logout']) && $_GET['logout'] == 1 && !defined('skip_utils_class')) {
$utils->logoffUser();
header('Location: index.xml');
}
Expand Down Expand Up @@ -153,6 +155,12 @@
}
$search = new SearchMgr;
}
if(defined('load_itemproto_class')) {
if(!@include('classes/class.itemproto.php')) {
die('<b>Error:</b> can not load itemProto class!');
}
$proto = new ItemProto;
}
// start XML parser
if(!@include('classes/class.xmlhandler.php')) {
die('<b>Error:</b> can not load XML handler class!');
Expand Down
6 changes: 3 additions & 3 deletions includes/classes/class.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 212
* @revision 214
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -306,11 +306,11 @@ public function BuildCategoriesTree() {
}

public function BuildStatisticsCategoriesTree() {
$categoryIds = $this->aDB->select("SELECT `id`, `name_".$this->_locale."` AS `name` FROM `armory_statistics_category` WHERE `parentCategory`=1");
$categoryIds = $this->aDB->select("SELECT `id`, `name_".$this->_locale."` AS `name` FROM `armory_achievement_category` WHERE `parentCategory`=1");
$root_tree = array();
$i = 0;
foreach($categoryIds as $cat) {
$child_categories = $this->aDB->select("SELECT `id`, `name_".$this->_locale."` AS `name` FROM `armory_statistics_category` WHERE `parentCategory`=?", $cat['id']);
$child_categories = $this->aDB->select("SELECT `id`, `name_".$this->_locale."` AS `name` FROM `armory_achievement_category` WHERE `parentCategory`=?", $cat['id']);
if($child_categories) {
$root_tree[$i]['child'] = array();
$child_count = count($child_categories);
Expand Down
30 changes: 21 additions & 9 deletions includes/classes/class.items.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 209
* @revision 214
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -447,14 +447,26 @@ public function BuildLootTable($item, $vendor, $data=false) {
return false;
break;
case 'reagent':
$ReagentLoot = $this->aDB->select("
SELECT `Reagent_1`, `Reagent_2`, `Reagent_3`, `Reagent_4`, `Reagent_5`, `Reagent_6`, `Reagent_7`, `Reagent_8`,
`ReagentCount_1`, `ReagentCount_2`, `ReagentCount_3`, `ReagentCount_4`, `ReagentCount_5`, `ReagentCount_6`,
`ReagentCount_7`, `ReagentCount_8`, `EffectItemType_1`, `EffectItemType_2`, `EffectItemType_3`,
`SpellName_".$this->_locale."` AS `SpellName`, `spellicon`
FROM `armory_spell`
WHERE `Reagent_1`=? OR `Reagent_2`=? OR `Reagent_3`=? OR `Reagent_4`=? OR
`Reagent_5`=? OR `Reagent_6`=? OR `Reagent_7`=? OR `Reagent_8`=?", $item, $item, $item, $item, $item, $item, $item, $item);
if($this->_locale == 'en_gb' || $this->_locale == 'ru_ru') {
$ReagentLoot = $this->aDB->select("
SELECT `Reagent_1`, `Reagent_2`, `Reagent_3`, `Reagent_4`, `Reagent_5`, `Reagent_6`, `Reagent_7`, `Reagent_8`,
`ReagentCount_1`, `ReagentCount_2`, `ReagentCount_3`, `ReagentCount_4`, `ReagentCount_5`, `ReagentCount_6`,
`ReagentCount_7`, `ReagentCount_8`, `EffectItemType_1`, `EffectItemType_2`, `EffectItemType_3`,
`SpellName_".$this->_locale."` AS `SpellName`, `spellicon`
FROM `armory_spell`
WHERE `Reagent_1`=? OR `Reagent_2`=? OR `Reagent_3`=? OR `Reagent_4`=? OR
`Reagent_5`=? OR `Reagent_6`=? OR `Reagent_7`=? OR `Reagent_8`=?", $item, $item, $item, $item, $item, $item, $item, $item);
}
else {
$ReagentLoot = $this->aDB->select("
SELECT `Reagent_1`, `Reagent_2`, `Reagent_3`, `Reagent_4`, `Reagent_5`, `Reagent_6`, `Reagent_7`, `Reagent_8`,
`ReagentCount_1`, `ReagentCount_2`, `ReagentCount_3`, `ReagentCount_4`, `ReagentCount_5`, `ReagentCount_6`,
`ReagentCount_7`, `ReagentCount_8`, `EffectItemType_1`, `EffectItemType_2`, `EffectItemType_3`,
`SpellName_en_gb` AS `SpellName`, `spellicon`
FROM `armory_spell`
WHERE `Reagent_1`=? OR `Reagent_2`=? OR `Reagent_3`=? OR `Reagent_4`=? OR
`Reagent_5`=? OR `Reagent_6`=? OR `Reagent_7`=? OR `Reagent_8`=?", $item, $item, $item, $item, $item, $item, $item, $item);
}
if(!$ReagentLoot) {
return false;
}
Expand Down
12 changes: 9 additions & 3 deletions item-tooltip.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 203
* @revision 214
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -517,10 +517,16 @@
for($i=1;$i<4;$i++) {
if($data['spellid_'.$i] > 0) {
$spell_tmp = $armory->aDB->selectRow("SELECT * FROM `armory_spell` WHERE `id`=?", $data['spellid_'.$i]);
if(!isset($spell_tmp['Description_'.$armory->_locale])) {
if($armory->_locale == 'en_gb' || $armory->_locale == 'ru_ru') {
$tmp_locale = $armory->_locale;
}
else {
$tmp_locale = 'en_gb';
}
if(!isset($spell_tmp['Description_' . $tmp_locale])) {
continue;
}
$spellInfo = $items->spellReplace($spell_tmp, Utils::ValidateText($spell_tmp['Description_'.$_locale]));
$spellInfo = $items->spellReplace($spell_tmp, Utils::ValidateText($spell_tmp['Description_'.$tmp_locale]));
if($spellInfo) {
$spellInfo = str_replace('&quot;', '"', $spellInfo);
$xml->XMLWriter()->startElement('spell');
Expand Down
Binary file added sql/wowarmory_rc1_r214.7z
Binary file not shown.

0 comments on commit 11b43df

Please sign in to comment.