diff --git a/includes/armory_loader.php b/includes/armory_loader.php index d1544b47c..001673af0 100644 --- a/includes/armory_loader.php +++ b/includes/armory_loader.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 214 + * @revision 215 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -30,8 +30,8 @@ if(!@include('classes/class.connector.php')) { die('Error: can not load connector class!'); } -define('DB_VERSION', 'armory_r214'); -define('ARMORY_REVISION', 214); +define('DB_VERSION', 'armory_r215'); +define('ARMORY_REVISION', 215); $armory = new Connector(); /* Check DbVersion */ $dbVersion = $armory->aDB->selectCell("SELECT `version` FROM `armory_db_version`"); diff --git a/includes/classes/class.achievements.php b/includes/classes/class.achievements.php index c65394266..6a58820f3 100644 --- a/includes/classes/class.achievements.php +++ b/includes/classes/class.achievements.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 214 + * @revision 215 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -469,7 +469,7 @@ public function BuildAchievementCriteriaTable() { $this->Log()->writeError('%s : player guid or achievement id not defiend', __METHOD__); return false; } - $data = $this->aDB->select("SELECT * FROM `armory_achievement_criteria` WHERE `referredAchievement`=? ORDER BY `order`", $this->achId); + $data = $this->aDB->select("SELECT * FROM `armory_achievement_criteria` WHERE `referredAchievement`=? ORDER BY `showOrder`", $this->achId); if(!$data) { $this->Log()->writeError('%s : achievement criteria for achievement #%d not found', __METHOD__, $this->achId); return false; @@ -480,13 +480,15 @@ public function BuildAchievementCriteriaTable() { if($criteria['completionFlag']&ACHIEVEMENT_CRITERIA_FLAG_HIDE_CRITERIA) { continue; } - $achievement_criteria[$i]['id'] = $criteria['id']; - $achievement_criteria[$i]['name'] = $criteria['name_'.$this->_locale]; $m_data = $this->GetCriteriaData($criteria['id']); - if(!$m_data['counter']) { + if(!isset($m_data['counter']) || !$m_data['counter']) { $m_data['counter'] = 0; } - $achievement_criteria[$i]['counter'] = $m_data['counter']; + $achievement_criteria[$i]['id'] = $criteria['id']; + if(isset($m_data['date']) && $m_data['date'] > 0) { + $achievement_criteria[$i]['date'] = date('Y-m-d\TH:i:s\+01:00', $m_data['date']); + } + $achievement_criteria[$i]['name'] = $criteria['name_'.$this->_locale]; if($criteria['completionFlag']&ACHIEVEMENT_CRITERIA_FLAG_SHOW_PROGRESS_BAR || $criteria['completionFlag']&ACHIEVEMENT_FLAG_COUNTER) { if($criteria['completionFlag']&ACHIEVEMENT_CRITERIA_FLAG_MONEY_COUNTER) { $achievement_criteria[$i]['maxQuantityGold'] = $criteria['value']; diff --git a/sql/updates/armory_r215_armory_achievement_criteria.sql b/sql/updates/armory_r215_armory_achievement_criteria.sql new file mode 100644 index 000000000..c5c08d8d1 --- /dev/null +++ b/sql/updates/armory_r215_armory_achievement_criteria.sql @@ -0,0 +1,3 @@ +UPDATE `armory_db_version` SET `version` = 'armory_r215'; +ALTER TABLE `armory_achievement_criteria` DROP `name_es_es`; +UPDATE `armory_achievement_category` SET `name_ru_ru` = 'Lich King (5)' WHERE `id` =14921 LIMIT 1; \ No newline at end of file