diff --git a/includes/types/icon.class.php b/includes/types/icon.class.php index 44df08ee..7e4909f2 100644 --- a/includes/types/icon.class.php +++ b/includes/types/icon.class.php @@ -78,7 +78,7 @@ class IconList extends BaseType 'buildingcount' => 0, // UNUSED 'petcount' => (int)$this->getField('nPets'), 'threatcount' => 0, // UNUSED - 'classcount' => 0 // class icons are hardcoeded and do not referenced in dbc + 'classcount' => 0 // class icons are hardcoded and not referenced in dbc ); } diff --git a/pages/icon.php b/pages/icon.php index 2bc67e7e..2c5d3677 100644 --- a/pages/icon.php +++ b/pages/icon.php @@ -54,7 +54,10 @@ class IconPage extends GenericPage if (!$ubSpells->error) { $this->extendGlobalData($ubSpells->getJsGlobals()); - $this->lvTabs[] = [SpellList::$brickFile, ['data' => array_values($ubSpells->getListviewData())]]; + $this->lvTabs[] = [SpellList::$brickFile, array( + 'data' => array_values($ubSpells->getListviewData()), + 'id' => 'used-by-spell' + )]; } // used by: item @@ -62,7 +65,10 @@ class IconPage extends GenericPage if (!$ubItems->error) { $this->extendGlobalData($ubItems->getJsGlobals()); - $this->lvTabs[] = [ItemList::$brickFile, ['data' =>array_values( $ubItems->getListviewData())]]; + $this->lvTabs[] = [ItemList::$brickFile, array( + 'data' => array_values($ubItems->getListviewData()), + 'id' => 'used-by-item' + )]; } // used by: achievement @@ -70,7 +76,10 @@ class IconPage extends GenericPage if (!$ubAchievements->error) { $this->extendGlobalData($ubAchievements->getJsGlobals()); - $this->lvTabs[] = [AchievementList::$brickFile, ['data' => array_values($ubAchievements->getListviewData())]]; + $this->lvTabs[] = [AchievementList::$brickFile, array( + 'data' => array_values($ubAchievements->getListviewData()), + 'id' => 'used-by-achievement' + )]; } // used by: currency @@ -78,7 +87,10 @@ class IconPage extends GenericPage if (!$ubCurrencies->error) { $this->extendGlobalData($ubCurrencies->getJsGlobals()); - $this->lvTabs[] = [CurrencyList::$brickFile, ['data' => array_values($ubCurrencies->getListviewData())]]; + $this->lvTabs[] = [CurrencyList::$brickFile, array( + 'data' => array_values($ubCurrencies->getListviewData()), + 'id' => 'used-by-currency' + )]; } // used by: hunter pet @@ -86,7 +98,10 @@ class IconPage extends GenericPage if (!$ubPets->error) { $this->extendGlobalData($ubPets->getJsGlobals()); - $this->lvTabs[] = [PetList::$brickFile, ['data' => array_values($ubPets->getListviewData())]]; + $this->lvTabs[] = [PetList::$brickFile, array( + 'data' => array_values($ubPets->getListviewData()), + 'id' => 'used-by-pet' + )]; } } diff --git a/pages/icons.php b/pages/icons.php index cbd5991d..d6b8e6c2 100644 --- a/pages/icons.php +++ b/pages/icons.php @@ -17,12 +17,11 @@ class IconsPage extends GenericPage protected $mode = CACHE_TYPE_PAGE; protected $js = ['filters.js']; - public function __construct($pageCall, $pageParam) + public function __construct($pageCall) { $this->filterObj = new IconListFilter(); - $this->getCategoryFromUrl($pageParam);; - parent::__construct($pageCall, $pageParam); + parent::__construct($pageCall); $this->name = Util::ucFirst(Lang::game('icons')); } diff --git a/setup/db_structure.sql b/setup/db_structure.sql index 20d3f8f6..a9887cc2 100644 --- a/setup/db_structure.sql +++ b/setup/db_structure.sql @@ -858,10 +858,12 @@ DROP TABLE IF EXISTS `aowow_icons`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `aowow_icons` ( - `id` mediumint(9) NOT NULL, - `iconString` varchar(55) NOT NULL DEFAULT '', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `cuFlags` int(11) unsigned NOT NULL DEFAULT '0', + `name` varchar(55) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + INDEX `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; /*!40101 SET character_set_client = @saved_cs_client */; -- diff --git a/setup/tools/sqlgen/icons.func.php b/setup/tools/sqlgen/icons.func.php index 184497e3..400583f8 100644 --- a/setup/tools/sqlgen/icons.func.php +++ b/setup/tools/sqlgen/icons.func.php @@ -9,7 +9,7 @@ if (!CLI) $customData = array( ); -$reqDBC = ['spellicon', 'itemdisplayinfo']; +$reqDBC = ['spellicon', 'itemdisplayinfo', 'creaturefamily']; function icons() { @@ -22,6 +22,8 @@ function icons() (SELECT LOWER(SUBSTRING_INDEX(iconPath, "\\\\", -1)) AS x FROM dbc_spellicon WHERE iconPath LIKE "%icons%") UNION (SELECT LOWER(inventoryIcon1) AS x FROM dbc_itemdisplayinfo WHERE inventoryIcon1 <> "") + UNION + (SELECT LOWER(SUBSTRING_INDEX(iconString, "\\\\", -1)) AS x FROM dbc_creaturefamily WHERE iconString LIKE "%icons%") ) y GROUP BY x diff --git a/setup/updates/1490815301_01.sql b/setup/updates/1490815301_01.sql index 4f3608c0..75bc1c42 100644 --- a/setup/updates/1490815301_01.sql +++ b/setup/updates/1490815301_01.sql @@ -5,7 +5,7 @@ CREATE TABLE `aowow_icons` ( `name` VARCHAR(55) NOT NULL DEFAULT '', PRIMARY KEY (`id`), INDEX `name` (`name`) -) COLLATE='utf8_general_ci' ENGINE=MyISAM AUTO_INCREMENT=1; +) COLLATE='utf8_general_ci' ENGINE=InnoDB AUTO_INCREMENT=1; ALTER TABLE `aowow_items` ADD COLUMN `iconId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `name_loc8`,