Page/Listview

* refer to Listview template by default name if able
This commit is contained in:
Sarjuuk
2024-02-05 22:36:16 +01:00
parent 6b0f617d1b
commit dd9eaf49ff
53 changed files with 240 additions and 239 deletions

View File

@@ -9,7 +9,7 @@ class CreatureList extends BaseType
use spawnHelper; use spawnHelper;
public static $type = Type::NPC; public static $type = Type::NPC;
public static $brickFile = 'creature'; public static $brickFile = 'npc';
public static $dataTable = '?_creature'; public static $dataTable = '?_creature';
protected $queryBase = 'SELECT ct.*, ct.id AS ARRAY_KEY FROM ?_creature ct'; protected $queryBase = 'SELECT ct.*, ct.id AS ARRAY_KEY FROM ?_creature ct';

View File

@@ -9,7 +9,7 @@ class IconList extends BaseType
use listviewHelper; use listviewHelper;
public static $type = Type::ICON; public static $type = Type::ICON;
public static $brickFile = 'icon'; public static $brickFile = 'icongallery';
public static $dataTable = '?_icons'; public static $dataTable = '?_icons';
public static $contribute = CONTRIBUTE_CO; public static $contribute = CONTRIBUTE_CO;

View File

@@ -236,7 +236,7 @@ class AchievementPage extends GenericPage
['id', $this->typeId, '!'] ['id', $this->typeId, '!']
); );
$saList = new AchievementList($conditions); $saList = new AchievementList($conditions);
$this->lvTabs[] = ['achievement', array( $this->lvTabs[] = [AchievementList::$brickFile, array(
'data' => array_values($saList->getListviewData()), 'data' => array_values($saList->getListviewData()),
'id' => 'see-also', 'id' => 'see-also',
'name' => '$LANG.tab_seealso', 'name' => '$LANG.tab_seealso',
@@ -252,7 +252,7 @@ class AchievementPage extends GenericPage
if (!empty($refs)) if (!empty($refs))
{ {
$coList = new AchievementList(array(['id', $refs])); $coList = new AchievementList(array(['id', $refs]));
$this->lvTabs[] = ['achievement', array( $this->lvTabs[] = [AchievementList::$brickFile, array(
'data' => array_values($coList->getListviewData()), 'data' => array_values($coList->getListviewData()),
'id' => 'criteria-of', 'id' => 'criteria-of',
'name' => '$LANG.tab_criteriaof', 'name' => '$LANG.tab_criteriaof',

View File

@@ -115,7 +115,7 @@ class AchievementsPage extends GenericPage
$tabData['_errors'] = 1; $tabData['_errors'] = 1;
} }
$this->lvTabs[] = ['achievement', $tabData]; $this->lvTabs[] = [AchievementList::$brickFile, $tabData];
} }
protected function postCache() protected function postCache()

View File

@@ -289,7 +289,7 @@ class AdminPage extends GenericPage
$data[$id]['rev'] = $rev; $data[$id]['rev'] = $rev;
} }
$this->lvTabs[] = ['guide', array( $this->lvTabs[] = [GuideList::$brickFile, array(
'data' => array_values($data), 'data' => array_values($data),
'hiddenCols' => ['patch', 'comments', 'views', 'rating'], 'hiddenCols' => ['patch', 'comments', 'views', 'rating'],
'extraCols' => '$_' 'extraCols' => '$_'

View File

@@ -121,7 +121,7 @@ class AreaTriggerPage extends GenericPage
if (!$relQuest->error) if (!$relQuest->error)
{ {
$this->extendGlobalData($relQuest->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS)); $this->extendGlobalData($relQuest->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS));
$this->lvTabs[] = ['quest', ['data' => array_values($relQuest->getListviewData())]]; $this->lvTabs[] = [QuestList::$brickFile, ['data' => array_values($relQuest->getListviewData())]];
} }
} }
else if ($_type == AT_TYPE_TELEPORT) else if ($_type == AT_TYPE_TELEPORT)
@@ -129,7 +129,7 @@ class AreaTriggerPage extends GenericPage
$relZone = new ZoneList(array(['id', $this->subject->getField('teleportA')])); $relZone = new ZoneList(array(['id', $this->subject->getField('teleportA')]));
if (!$relZone->error) if (!$relZone->error)
{ {
$this->lvTabs[] = ['zone', ['data' => array_values($relZone->getListviewData())]]; $this->lvTabs[] = [ZoneList::$brickFile, ['data' => array_values($relZone->getListviewData())]];
} }
} }
else if ($_type == AT_TYPE_SCRIPT) else if ($_type == AT_TYPE_SCRIPT)
@@ -137,7 +137,7 @@ class AreaTriggerPage extends GenericPage
$relTrigger = new AreaTriggerList(array(['id', $this->typeId, '!'], ['name', $this->subject->getField('name')])); $relTrigger = new AreaTriggerList(array(['id', $this->typeId, '!'], ['name', $this->subject->getField('name')]));
if (!$relTrigger->error) if (!$relTrigger->error)
{ {
$this->lvTabs[] = ['areatrigger', ['data' => array_values($relTrigger->getListviewData()), 'name' => Util::ucFirst(Lang::game('areatrigger'))], 'areatrigger']; $this->lvTabs[] = [AreaTriggerList::$brickFile, ['data' => array_values($relTrigger->getListviewData()), 'name' => Util::ucFirst(Lang::game('areatrigger'))], 'areatrigger'];
} }
} }
} }

View File

@@ -66,7 +66,7 @@ class AreaTriggersPage extends GenericPage
} }
$this->lvTabs[] = ['areatrigger', $tabData, 'areatrigger']; $this->lvTabs[] = [AreaTriggerList::$brickFile, $tabData, 'areatrigger'];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -120,7 +120,7 @@ class ArenaTeamPage extends GenericPage
$member = new LocalProfileList(array(['atm.arenaTeamId', $this->subjectGUID])); $member = new LocalProfileList(array(['atm.arenaTeamId', $this->subjectGUID]));
if (!$member->error) if (!$member->error)
{ {
$this->lvTabs[] = ['profile', array( $this->lvTabs[] = [ProfileList::$brickFile, array(
'data' => array_values($member->getListviewData(PROFILEINFO_CHARACTER | PROFILEINFO_ARENA)), 'data' => array_values($member->getListviewData(PROFILEINFO_CHARACTER | PROFILEINFO_ARENA)),
'sort' => [-15], 'sort' => [-15],
'visibleCols' => ['race', 'classs', 'level', 'talents', 'gearscore', 'rating', 'wins', 'losses'], 'visibleCols' => ['race', 'classs', 'level', 'talents', 'gearscore', 'rating', 'wins', 'losses'],

View File

@@ -117,7 +117,7 @@ class ArenaTeamsPage extends GenericPage
$tabData['_errors'] = 1; $tabData['_errors'] = 1;
} }
$this->lvTabs[] = ['profile', $tabData, 'membersCol']; $this->lvTabs[] = [ArenaTeamList::$brickFile, $tabData, 'membersCol'];
} }
protected function postCache() protected function postCache()

View File

@@ -135,7 +135,7 @@ class ClassPage extends GenericPage
{ {
$this->extendGlobalData($genSpells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); $this->extendGlobalData($genSpells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($genSpells->getListviewData()), 'data' => array_values($genSpells->getListviewData()),
'id' => 'spells', 'id' => 'spells',
'name' => '$LANG.tab_spells', 'name' => '$LANG.tab_spells',
@@ -165,7 +165,7 @@ class ClassPage extends GenericPage
if ($items->hasDiffFields(['requiredRace'])) if ($items->hasDiffFields(['requiredRace']))
$hiddenCols = ['side']; $hiddenCols = ['side'];
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($items->getListviewData()), 'data' => array_values($items->getListviewData()),
'id' => 'items', 'id' => 'items',
'name' => '$LANG.tab_items', 'name' => '$LANG.tab_items',
@@ -189,7 +189,7 @@ class ClassPage extends GenericPage
{ {
$this->extendGlobalData($quests->getJSGlobals()); $this->extendGlobalData($quests->getJSGlobals());
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($quests->getListviewData()), 'data' => array_values($quests->getListviewData()),
'sort' => ['reqlevel', 'name'] 'sort' => ['reqlevel', 'name']
)]; )];
@@ -201,7 +201,7 @@ class ClassPage extends GenericPage
{ {
$this->extendGlobalData($sets->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($sets->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['itemset', array( $this->lvTabs[] = [ItemsetList::$brickFile, array(
'data' => array_values($sets->getListviewData()), 'data' => array_values($sets->getListviewData()),
'note' => sprintf(Util::$filterResultString, '?itemsets&filter=cl='.$this->typeId), 'note' => sprintf(Util::$filterResultString, '?itemsets&filter=cl='.$this->typeId),
'hiddenCols' => ['classes'], 'hiddenCols' => ['classes'],
@@ -219,7 +219,7 @@ class ClassPage extends GenericPage
$trainer = new CreatureList($conditions); $trainer = new CreatureList($conditions);
if (!$trainer->error) if (!$trainer->error)
{ {
$this->lvTabs[] = ['creature', array( $this->lvTabs[] = [CreatureList::$brickFile, array(
'data' => array_values($trainer->getListviewData()), 'data' => array_values($trainer->getListviewData()),
'id' => 'trainers', 'id' => 'trainers',
'name' => '$LANG.tab_trainers' 'name' => '$LANG.tab_trainers'
@@ -229,7 +229,7 @@ class ClassPage extends GenericPage
// Tab: Races // Tab: Races
$races = new CharRaceList(array(['classMask', $_mask, '&'])); $races = new CharRaceList(array(['classMask', $_mask, '&']));
if (!$races->error) if (!$races->error)
$this->lvTabs[] = ['race', ['data' => array_values($races->getListviewData())]]; $this->lvTabs[] = [CharRaceList::$brickFile, ['data' => array_values($races->getListviewData())]];
} }
} }

View File

@@ -27,7 +27,7 @@ class ClassesPage extends GenericPage
{ {
$classes = new CharClassList(); $classes = new CharClassList();
if (!$classes->error) if (!$classes->error)
$this->lvTabs[] = ['class', ['data' => array_values($classes->getListviewData())]]; $this->lvTabs[] = [CharClassList::$brickFile, ['data' => array_values($classes->getListviewData())]];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -37,7 +37,7 @@ class CurrenciesPage extends GenericPage
$conditions[] = ['category', (int)$this->category[0]]; $conditions[] = ['category', (int)$this->category[0]];
$money = new CurrencyList($conditions); $money = new CurrencyList($conditions);
$this->lvTabs[] = ['currency', ['data' => array_values($money->getListviewData())]]; $this->lvTabs[] = [CurrencyList::$brickFile, ['data' => array_values($money->getListviewData())]];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -155,7 +155,7 @@ class CurrencyPage extends GenericPage
); );
} }
$this->lvTabs[] = ['creature', array( $this->lvTabs[] = [CreatureList::$brickFile, array(
'data' => array_values($sbData), 'data' => array_values($sbData),
'name' => '$LANG.tab_soldby', 'name' => '$LANG.tab_soldby',
'id' => 'sold-by-npc', 'id' => 'sold-by-npc',
@@ -183,7 +183,7 @@ class CurrencyPage extends GenericPage
if ($createdBy->hasSetFields(['reagent1'])) if ($createdBy->hasSetFields(['reagent1']))
$tabData['visibleCols'] = ['reagents']; $tabData['visibleCols'] = ['reagents'];
$this->lvTabs[] = ['spell', $tabData]; $this->lvTabs[] = [SpellList::$brickFile, $tabData];
} }
} }
@@ -221,7 +221,7 @@ class CurrencyPage extends GenericPage
if ($boughtBy->getMatches() > CFG_SQL_LIMIT_DEFAULT) if ($boughtBy->getMatches() > CFG_SQL_LIMIT_DEFAULT)
$tabData['note'] = sprintf(Util::$filterResultString, $n); $tabData['note'] = sprintf(Util::$filterResultString, $n);
$this->lvTabs[] = ['item', $tabData]; $this->lvTabs[] = [ItemList::$brickFile, $tabData];
$this->extendGlobalData($boughtBy->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); $this->extendGlobalData($boughtBy->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
} }

View File

@@ -154,7 +154,7 @@ class EmotePage extends GenericPage
); );
$acv = new AchievementList($condition); $acv = new AchievementList($condition);
$this->lvTabs[] = ['achievement', ['data' => array_values($acv->getListviewData())]]; $this->lvTabs[] = [AchievementList::$brickFile, ['data' => array_values($acv->getListviewData())]];
$this->extendGlobalData($acv->getJsGlobals()); $this->extendGlobalData($acv->getJsGlobals());
@@ -172,7 +172,7 @@ class EmotePage extends GenericPage
$d['gender'] = $em[$id]['gender']; $d['gender'] = $em[$id]['gender'];
} }
$this->lvTabs[] = ['sound', array( $this->lvTabs[] = [SoundList::$brickFile, array(
'data' => array_values($data), 'data' => array_values($data),
// gender races // gender races
'extraCols' => ['$Listview.templates.title.columns[1]', '$Listview.templates.classs.columns[1]'] 'extraCols' => ['$Listview.templates.title.columns[1]', '$Listview.templates.classs.columns[1]']

View File

@@ -34,7 +34,7 @@ class EmotesPage extends GenericPage
'name' => Util::ucFirst(Lang::game('emotes')) 'name' => Util::ucFirst(Lang::game('emotes'))
); );
$this->lvTabs[] = ['emote', $tabData, 'emote']; $this->lvTabs[] = [EmoteList::$brickFile, $tabData, 'emote'];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -180,7 +180,7 @@ class EnchantmentPage extends GenericPage
$gemList = new ItemList(array(['gemEnchantmentId', $this->typeId])); $gemList = new ItemList(array(['gemEnchantmentId', $this->typeId]));
if (!$gemList->error) if (!$gemList->error)
{ {
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($gemList->getListviewData()), 'data' => array_values($gemList->getListviewData()),
'name' => '$LANG.tab_usedby + \' \' + LANG.gems', 'name' => '$LANG.tab_usedby + \' \' + LANG.gems',
'id' => 'used-by-gem', 'id' => 'used-by-gem',
@@ -193,7 +193,7 @@ class EnchantmentPage extends GenericPage
$socketsList = new ItemList(array(['socketBonus', $this->typeId])); $socketsList = new ItemList(array(['socketBonus', $this->typeId]));
if (!$socketsList->error) if (!$socketsList->error)
{ {
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($socketsList->getListviewData()), 'data' => array_values($socketsList->getListviewData()),
'name' => '$LANG.tab_socketbonus', 'name' => '$LANG.tab_socketbonus',
'id' => 'used-by-socketbonus', 'id' => 'used-by-socketbonus',
@@ -229,7 +229,7 @@ class EnchantmentPage extends GenericPage
$ubItems = new ItemList($conditions); $ubItems = new ItemList($conditions);
if (!$ubItems->error) if (!$ubItems->error)
{ {
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($ubItems->getListviewData()), 'data' => array_values($ubItems->getListviewData()),
'name' => '$LANG.tab_usedby + \' \' + LANG.types[3][0]', 'name' => '$LANG.tab_usedby + \' \' + LANG.types[3][0]',
'id' => 'used-by-item', 'id' => 'used-by-item',
@@ -262,7 +262,7 @@ class EnchantmentPage extends GenericPage
} }
} }
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($spellData), 'data' => array_values($spellData),
'name' => '$LANG.tab_usedby + \' \' + LANG.types[6][0]', 'name' => '$LANG.tab_usedby + \' \' + LANG.types[6][0]',
'id' => 'used-by-spell', 'id' => 'used-by-spell',
@@ -296,7 +296,7 @@ class EnchantmentPage extends GenericPage
$data[$iId]['name'] .= ' '.Util::localizedString($ire[$iet[abs($re)]['ench']], 'name'); $data[$iId]['name'] .= ' '.Util::localizedString($ire[$iet[abs($re)]['ench']], 'name');
} }
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($data), 'data' => array_values($data),
'id' => 'used-by-rand', 'id' => 'used-by-rand',
'name' => '$LANG.tab_usedby + \' \' + \''.Lang::item('_rndEnchants').'\'', 'name' => '$LANG.tab_usedby + \' \' + \''.Lang::item('_rndEnchants').'\'',

View File

@@ -87,7 +87,7 @@ class EnchantmentsPage extends GenericPage
if ($this->filterObj->error) if ($this->filterObj->error)
$tabData['_errors'] = '$1'; $tabData['_errors'] = '$1';
$this->lvTabs[] = ['enchantment', $tabData, 'enchantment']; $this->lvTabs[] = [EnchantmentList::$brickFile, $tabData, 'enchantment'];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -121,7 +121,7 @@ class EventPage extends GenericPage
if ($hasFilter) if ($hasFilter)
$tabData['note'] = sprintf(Util::$filterResultString, '?npcs&filter=cr=38;crs='.$this->hId.';crv=0'); $tabData['note'] = sprintf(Util::$filterResultString, '?npcs&filter=cr=38;crs='.$this->hId.';crv=0');
$this->lvTabs[] = ['creature', $tabData]; $this->lvTabs[] = [CreatureList::$brickFile, $tabData];
} }
} }
@@ -140,7 +140,7 @@ class EventPage extends GenericPage
if ($hasFilter) if ($hasFilter)
$tabData['note'] = sprintf(Util::$filterResultString, '?objects&filter=cr=16;crs='.$this->hId.';crv=0'); $tabData['note'] = sprintf(Util::$filterResultString, '?objects&filter=cr=16;crs='.$this->hId.';crv=0');
$this->lvTabs[] = ['object', $tabData]; $this->lvTabs[] = [GameObjectList::$brickFile, $tabData];
} }
} }
@@ -161,7 +161,7 @@ class EventPage extends GenericPage
if ($hasFilter) if ($hasFilter)
$tabData['note'] = sprintf(Util::$filterResultString, '?achievements&filter=cr=11;crs='.$this->hId.';crv=0'); $tabData['note'] = sprintf(Util::$filterResultString, '?achievements&filter=cr=11;crs='.$this->hId.';crv=0');
$this->lvTabs[] = ['achievement', $tabData]; $this->lvTabs[] = [AchievementList::$brickFile, $tabData];
} }
} }
@@ -184,7 +184,7 @@ class EventPage extends GenericPage
if ($hasFilter) if ($hasFilter)
$tabData['note'] = sprintf(Util::$filterResultString, '?quests&filter=cr=33;crs='.$this->hId.';crv=0'); $tabData['note'] = sprintf(Util::$filterResultString, '?quests&filter=cr=33;crs='.$this->hId.';crv=0');
$this->lvTabs[] = ['quest', $tabData]; $this->lvTabs[] = [QuestList::$brickFile, $tabData];
$questItems = []; $questItems = [];
foreach (array_column($quests->rewards, Type::ITEM) as $arr) foreach (array_column($quests->rewards, Type::ITEM) as $arr)
@@ -221,7 +221,7 @@ class EventPage extends GenericPage
if ($hasFilter) if ($hasFilter)
$tabData['note'] = sprintf(Util::$filterResultString, '?items&filter=cr=160;crs='.$this->hId.';crv=0'); $tabData['note'] = sprintf(Util::$filterResultString, '?items&filter=cr=160;crs='.$this->hId.';crv=0');
$this->lvTabs[] = ['item', $tabData]; $this->lvTabs[] = [ItemList::$brickFile, $tabData];
} }
} }
@@ -258,7 +258,7 @@ class EventPage extends GenericPage
$relData = array_merge($relData, $d); $relData = array_merge($relData, $d);
} }
$this->lvTabs[] = ['event', array( $this->lvTabs[] = [WorldEventList::$brickFile, array(
'data' => array_values($relData), 'data' => array_values($relData),
'id' => 'see-also', 'id' => 'see-also',
'name' => '$LANG.tab_seealso', 'name' => '$LANG.tab_seealso',

View File

@@ -54,7 +54,7 @@ class EventsPage extends GenericPage
$data = array_values($events->getListviewData()); $data = array_values($events->getListviewData());
$this->lvTabs[] = ['event', ['data' => $data]]; $this->lvTabs[] = [WorldEventList::$brickFile, ['data' => $data]];
if ($_ = array_values(array_filter($data, function($x) {return $x['category'] > 0;}))) if ($_ = array_values(array_filter($data, function($x) {return $x['category'] > 0;})))
{ {

View File

@@ -187,7 +187,7 @@ class FactionPage extends GenericPage
if ($items->getMatches() > CFG_SQL_LIMIT_DEFAULT) if ($items->getMatches() > CFG_SQL_LIMIT_DEFAULT)
$tabData['note'] = sprintf(Util::$filterResultString, '?items&filter=cr=17;crs='.$this->typeId.';crv=0'); $tabData['note'] = sprintf(Util::$filterResultString, '?items&filter=cr=17;crs='.$this->typeId.';crv=0');
$this->lvTabs[] = ['item', $tabData, 'itemStandingCol']; $this->lvTabs[] = [ItemList::$brickFile, $tabData, 'itemStandingCol'];
} }
// tab: creatures with onKill reputation // tab: creatures with onKill reputation
@@ -220,7 +220,7 @@ class FactionPage extends GenericPage
if ($killCreatures->getMatches() > CFG_SQL_LIMIT_DEFAULT) if ($killCreatures->getMatches() > CFG_SQL_LIMIT_DEFAULT)
$tabData['note'] = sprintf(Util::$filterResultString, '?npcs&filter=cr=42;crs='.$this->typeId.';crv=0'); $tabData['note'] = sprintf(Util::$filterResultString, '?npcs&filter=cr=42;crs='.$this->typeId.';crv=0');
$this->lvTabs[] = ['creature', $tabData, 'npcRepCol']; $this->lvTabs[] = [CreatureList::$brickFile, $tabData, 'npcRepCol'];
} }
} }
} }
@@ -240,7 +240,7 @@ class FactionPage extends GenericPage
if ($members->getMatches() > CFG_SQL_LIMIT_DEFAULT) if ($members->getMatches() > CFG_SQL_LIMIT_DEFAULT)
$tabData['note'] = sprintf(Util::$filterResultString, '?npcs&filter=cr=3;crs='.$this->typeId.';crv=0'); $tabData['note'] = sprintf(Util::$filterResultString, '?npcs&filter=cr=3;crs='.$this->typeId.';crv=0');
$this->lvTabs[] = ['creature', $tabData]; $this->lvTabs[] = [CreatureList::$brickFile, $tabData];
} }
} }
@@ -249,7 +249,7 @@ class FactionPage extends GenericPage
{ {
$objects = new GameObjectList(array(['faction', $_])); $objects = new GameObjectList(array(['faction', $_]));
if (!$objects->error) if (!$objects->error)
$this->lvTabs[] = ['object', ['data' => array_values($objects->getListviewData())]]; $this->lvTabs[] = [GameObjectList::$brickFile, ['data' => array_values($objects->getListviewData())]];
} }
// tab: quests // tab: quests
@@ -274,7 +274,7 @@ class FactionPage extends GenericPage
if ($quests->getMatches() > CFG_SQL_LIMIT_DEFAULT) if ($quests->getMatches() > CFG_SQL_LIMIT_DEFAULT)
$tabData['note'] = sprintf(Util::$filterResultString, '?quests&filter=cr=1;crs='.$this->typeId.';crv=0'); $tabData['note'] = sprintf(Util::$filterResultString, '?quests&filter=cr=1;crs='.$this->typeId.';crv=0');
$this->lvTabs[] = ['quest', $tabData, 'questRepCol']; $this->lvTabs[] = [QuestList::$brickFile, $tabData, 'questRepCol'];
} }
// tab: achievements // tab: achievements
@@ -287,7 +287,7 @@ class FactionPage extends GenericPage
{ {
$this->extendGlobalData($acvs->getJSGlobals(GLOBALINFO_ANY)); $this->extendGlobalData($acvs->getJSGlobals(GLOBALINFO_ANY));
$this->lvTabs[] = ['achievement', array( $this->lvTabs[] = [AchievementList::$brickFile, array(
'data' => array_values($acvs->getListviewData()), 'data' => array_values($acvs->getListviewData()),
'id' => 'criteria-of', 'id' => 'criteria-of',
'name' => '$LANG.tab_criteriaof', 'name' => '$LANG.tab_criteriaof',

View File

@@ -55,7 +55,7 @@ class FactionsPage extends GenericPage
if (!$factions->error) if (!$factions->error)
$data = array_values($factions->getListviewData()); $data = array_values($factions->getListviewData());
$this->lvTabs[] = ['faction', ['data' => $data]]; $this->lvTabs[] = [FactionList::$brickFile, ['data' => $data]];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -761,6 +761,9 @@ class GenericPage
$this->addAnnouncements(); $this->addAnnouncements();
if (isset($this->lvTabs))
array_walk($this->lvTabs, function (&$x) { $x = array_pad($x, 3, null); });
include('template/pages/'.$this->tpl.'.tpl.php'); include('template/pages/'.$this->tpl.'.tpl.php');
die(); die();
} }

View File

@@ -124,7 +124,7 @@ class GuildPage extends GenericPage
$member = new LocalProfileList(array(['p.guild', $this->subjectGUID], CFG_SQL_LIMIT_NONE)); $member = new LocalProfileList(array(['p.guild', $this->subjectGUID], CFG_SQL_LIMIT_NONE));
if (!$member->error) if (!$member->error)
{ {
$this->lvTabs[] = ['profile', array( $this->lvTabs[] = [ProfileList::$brickFile, array(
'data' => array_values($member->getListviewData(PROFILEINFO_CHARACTER | PROFILEINFO_ARENA)), 'data' => array_values($member->getListviewData(PROFILEINFO_CHARACTER | PROFILEINFO_ARENA)),
'sort' => [-15], 'sort' => [-15],
'visibleCols' => ['race', 'classs', 'level', 'talents', 'gearscore', 'achievementpoints', 'guildrank'], 'visibleCols' => ['race', 'classs', 'level', 'talents', 'gearscore', 'achievementpoints', 'guildrank'],

View File

@@ -113,7 +113,7 @@ class GuildsPage extends GenericPage
$tabData['_errors'] = 1; $tabData['_errors'] = 1;
} }
$this->lvTabs[] = ['profile', $tabData, 'membersCol']; $this->lvTabs[] = [GuildList::$brickFile, $tabData, 'membersCol'];
} }
protected function postCache() protected function postCache()

View File

@@ -66,7 +66,7 @@ class IconsPage extends GenericPage
if ($this->filterObj->error) if ($this->filterObj->error)
$tabData['_errors'] = 1; $tabData['_errors'] = 1;
$this->lvTabs[] = ['icongallery', $tabData]; $this->lvTabs[] = [IconList::$brickFile, $tabData];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -442,7 +442,7 @@ class ItemPage extends genericPage
$this->extendGlobalIDs(Type::SPELL, $perfItem[$sId]['requiredSpecialization']); $this->extendGlobalIDs(Type::SPELL, $perfItem[$sId]['requiredSpecialization']);
} }
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($lvData), 'data' => array_values($lvData),
'name' => '$LANG.tab_createdby', 'name' => '$LANG.tab_createdby',
'id' => 'created-by', // should by exclusive with created-by from spell_loot 'id' => 'created-by', // should by exclusive with created-by from spell_loot
@@ -529,7 +529,7 @@ class ItemPage extends genericPage
if ($sf[6]) if ($sf[6])
$tabData['visibleCols'] = array_unique($sf[6]); $tabData['visibleCols'] = array_unique($sf[6]);
$this->lvTabs[] = ['item', $tabData]; $this->lvTabs[] = [ItemList::$brickFile, $tabData];
} }
} }
@@ -569,7 +569,7 @@ class ItemPage extends genericPage
if (!$contains->hasSetFields(['slot'])) if (!$contains->hasSetFields(['slot']))
$hCols[] = 'slot'; $hCols[] = 'slot';
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($contains->getListviewData()), 'data' => array_values($contains->getListviewData()),
'name' => '$LANG.tab_cancontain', 'name' => '$LANG.tab_cancontain',
'id' => 'can-contain', 'id' => 'can-contain',
@@ -586,7 +586,7 @@ class ItemPage extends genericPage
{ {
$this->extendGlobalData($contains->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($contains->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($contains->getListviewData()), 'data' => array_values($contains->getListviewData()),
'name' => '$LANG.tab_canbeplacedin', 'name' => '$LANG.tab_canbeplacedin',
'id' => 'can-be-placed-in', 'id' => 'can-be-placed-in',
@@ -616,7 +616,7 @@ class ItemPage extends genericPage
if (!$criteriaOf->hasSetFields(['reward_loc0'])) if (!$criteriaOf->hasSetFields(['reward_loc0']))
$tabData['hiddenCols'] = ['rewards']; $tabData['hiddenCols'] = ['rewards'];
$this->lvTabs[] = ['achievement', $tabData]; $this->lvTabs[] = [AchievementList::$brickFile, $tabData];
} }
// tab: reagent for // tab: reagent for
@@ -631,7 +631,7 @@ class ItemPage extends genericPage
{ {
$this->extendGlobalData($reagent->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); $this->extendGlobalData($reagent->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($reagent->getListviewData()), 'data' => array_values($reagent->getListviewData()),
'name' => '$LANG.tab_reagentfor', 'name' => '$LANG.tab_reagentfor',
'id' => 'reagent-for', 'id' => 'reagent-for',
@@ -653,7 +653,7 @@ class ItemPage extends genericPage
$lockedObj = new GameObjectList(array(['lockId', $lockIds])); $lockedObj = new GameObjectList(array(['lockId', $lockIds]));
if (!$lockedObj->error) if (!$lockedObj->error)
{ {
$this->lvTabs[] = ['object', array( $this->lvTabs[] = [GameObjectList::$brickFile, array(
'data' => array_values($lockedObj->getListviewData()), 'data' => array_values($lockedObj->getListviewData()),
'name' => '$LANG.tab_unlocks', 'name' => '$LANG.tab_unlocks',
'id' => 'unlocks-object' 'id' => 'unlocks-object'
@@ -666,7 +666,7 @@ class ItemPage extends genericPage
{ {
$this->extendGlobalData($lockedItm->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($lockedItm->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($lockedItm->getListviewData()), 'data' => array_values($lockedItm->getListviewData()),
'name' => '$LANG.tab_unlocks', 'name' => '$LANG.tab_unlocks',
'id' => 'unlocks-item' 'id' => 'unlocks-item'
@@ -701,7 +701,7 @@ class ItemPage extends genericPage
{ {
$this->extendGlobalData($saItems->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($saItems->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($saItems->getListviewData()), 'data' => array_values($saItems->getListviewData()),
'name' => '$LANG.tab_seealso', 'name' => '$LANG.tab_seealso',
'id' => 'see-also' 'id' => 'see-also'
@@ -716,7 +716,7 @@ class ItemPage extends genericPage
{ {
$this->extendGlobalData($starts->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS)); $this->extendGlobalData($starts->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS));
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($starts->getListviewData()), 'data' => array_values($starts->getListviewData()),
'name' => '$LANG.tab_starts', 'name' => '$LANG.tab_starts',
'id' => 'starts-quest' 'id' => 'starts-quest'
@@ -735,7 +735,7 @@ class ItemPage extends genericPage
{ {
$this->extendGlobalData($objective->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS)); $this->extendGlobalData($objective->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS));
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($objective->getListviewData()), 'data' => array_values($objective->getListviewData()),
'name' => '$LANG.tab_objectiveof', 'name' => '$LANG.tab_objectiveof',
'id' => 'objective-of-quest' 'id' => 'objective-of-quest'
@@ -753,7 +753,7 @@ class ItemPage extends genericPage
{ {
$this->extendGlobalData($provided->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS)); $this->extendGlobalData($provided->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS));
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($provided->getListviewData()), 'data' => array_values($provided->getListviewData()),
'name' => '$LANG.tab_providedfor', 'name' => '$LANG.tab_providedfor',
'id' => 'provided-for-quest' 'id' => 'provided-for-quest'
@@ -837,7 +837,7 @@ class ItemPage extends genericPage
} }
$this->lvTabs[] = ['creature', array( $this->lvTabs[] = [CreatureList::$brickFile, array(
'data' => array_values($sbData), 'data' => array_values($sbData),
'name' => '$LANG.tab_soldby', 'name' => '$LANG.tab_soldby',
'id' => 'sold-by-npc', 'id' => 'sold-by-npc',
@@ -885,7 +885,7 @@ class ItemPage extends genericPage
if ($boughtBy->getMatches() > CFG_SQL_LIMIT_DEFAULT && $n) if ($boughtBy->getMatches() > CFG_SQL_LIMIT_DEFAULT && $n)
$tabData['note'] = sprintf(Util::$filterResultString, $n); $tabData['note'] = sprintf(Util::$filterResultString, $n);
$this->lvTabs[] = ['item', $tabData]; $this->lvTabs[] = [ItemList::$brickFile, $tabData];
$this->extendGlobalData($boughtBy->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); $this->extendGlobalData($boughtBy->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
} }
@@ -924,7 +924,7 @@ class ItemPage extends genericPage
if ($taughtSpells->hasSetFields(['reagent1'])) if ($taughtSpells->hasSetFields(['reagent1']))
$visCols[] = 'reagents'; $visCols[] = 'reagents';
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($taughtSpells->getListviewData()), 'data' => array_values($taughtSpells->getListviewData()),
'name' => '$LANG.tab_teaches', 'name' => '$LANG.tab_teaches',
'id' => 'teaches', 'id' => 'teaches',
@@ -971,7 +971,7 @@ class ItemPage extends genericPage
$cdItems = new ItemList($conditions); $cdItems = new ItemList($conditions);
if (!$cdItems->error) if (!$cdItems->error)
{ {
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($cdItems->getListviewData()), 'data' => array_values($cdItems->getListviewData()),
'name' => '$LANG.tab_sharedcooldown', 'name' => '$LANG.tab_sharedcooldown',
'id' => 'shared-cooldown' 'id' => 'shared-cooldown'
@@ -1014,7 +1014,7 @@ class ItemPage extends genericPage
if (!$sounds->error) if (!$sounds->error)
{ {
$this->extendGlobalData($sounds->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($sounds->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['sound', ['data' => array_values($sounds->getListviewData())]]; $this->lvTabs[] = [SoundList::$brickFile, ['data' => array_values($sounds->getListviewData())]];
} }
} }

View File

@@ -418,7 +418,7 @@ class ItemsPage extends GenericPage
$tabData['data'] = array_values($tabData['data']); $tabData['data'] = array_values($tabData['data']);
$this->lvTabs[] = ['item', $tabData]; $this->lvTabs[] = [ItemList::$brickFile, $tabData];
} }
// reformat for use in template // reformat for use in template
@@ -429,7 +429,7 @@ class ItemsPage extends GenericPage
if (empty($this->lvTabs)) if (empty($this->lvTabs))
{ {
$this->forceTabs = false; $this->forceTabs = false;
$this->lvTabs[] = ['item', ['data' => []]]; $this->lvTabs[] = [ItemList::$brickFile, ['data' => []]];
} }
} }

View File

@@ -227,7 +227,7 @@ class ItemsetPage extends GenericPage
if (!$relSets->hasDiffFields(['classMask'])) if (!$relSets->hasDiffFields(['classMask']))
$tabData['hiddenCols'] = ['classes']; $tabData['hiddenCols'] = ['classes'];
$this->lvTabs[] = ['itemset', $tabData]; $this->lvTabs[] = [ItemsetList::$brickFile, $tabData];
$this->extendGlobalData($relSets->getJSGlobals()); $this->extendGlobalData($relSets->getJSGlobals());
} }

View File

@@ -71,7 +71,7 @@ class ItemsetsPage extends GenericPage
if ($this->filterObj->error) if ($this->filterObj->error)
$tabData['_errors'] = 1; $tabData['_errors'] = 1;
$this->lvTabs[] = ['itemset', $tabData]; $this->lvTabs[] = [ItemsetList::$brickFile, $tabData];
} }
protected function postCache() protected function postCache()

View File

@@ -32,7 +32,7 @@ class MailsPage extends GenericPage
$this->extendGlobalData($mails->getJsGlobals()); $this->extendGlobalData($mails->getJsGlobals());
$this->lvTabs[] = ['mail', $tabData, 'mail']; $this->lvTabs[] = [MailList::$brickFile, $tabData, 'mail'];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -480,14 +480,14 @@ class NpcPage extends GenericPage
} }
if ($normal) if ($normal)
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($normal), 'data' => array_values($normal),
'name' => '$LANG.tab_abilities', 'name' => '$LANG.tab_abilities',
'id' => 'abilities' 'id' => 'abilities'
)]; )];
if ($controled) if ($controled)
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($controled), 'data' => array_values($controled),
'name' => '$LANG.tab_controlledabilities', 'name' => '$LANG.tab_controlledabilities',
'id' => 'controlled-abilities' 'id' => 'controlled-abilities'
@@ -508,7 +508,7 @@ class NpcPage extends GenericPage
{ {
$this->extendGlobalData($sbSpell->getJSGlobals()); $this->extendGlobalData($sbSpell->getJSGlobals());
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($sbSpell->getListviewData()), 'data' => array_values($sbSpell->getListviewData()),
'name' => '$LANG.tab_summonedby', 'name' => '$LANG.tab_summonedby',
'id' => 'summoned-by-spell' 'id' => 'summoned-by-spell'
@@ -524,7 +524,7 @@ class NpcPage extends GenericPage
{ {
$this->extendGlobalData($sbNPC->getJSGlobals()); $this->extendGlobalData($sbNPC->getJSGlobals());
$this->lvTabs[] = ['creature', array( $this->lvTabs[] = [CreatureList::$brickFile, array(
'data' => array_values($sbNPC->getListviewData()), 'data' => array_values($sbNPC->getListviewData()),
'name' => '$LANG.tab_summonedby', 'name' => '$LANG.tab_summonedby',
'id' => 'summoned-by-npc' 'id' => 'summoned-by-npc'
@@ -540,7 +540,7 @@ class NpcPage extends GenericPage
{ {
$this->extendGlobalData($sbGO->getJSGlobals()); $this->extendGlobalData($sbGO->getJSGlobals());
$this->lvTabs[] = ['object', array( $this->lvTabs[] = [GameObjectList::$brickFile, array(
'data' => array_values($sbGO->getListviewData()), 'data' => array_values($sbGO->getListviewData()),
'name' => '$LANG.tab_summonedby', 'name' => '$LANG.tab_summonedby',
'id' => 'summoned-by-object' 'id' => 'summoned-by-object'
@@ -618,7 +618,7 @@ class NpcPage extends GenericPage
if ($extra) if ($extra)
$tabData['extraCols'] = array_values($extra); $tabData['extraCols'] = array_values($extra);
$this->lvTabs[] = ['spell', $tabData]; $this->lvTabs[] = [SpellList::$brickFile, $tabData];
} }
} }
else else
@@ -657,7 +657,7 @@ class NpcPage extends GenericPage
$row['condition'][0][$id.':'.$this->typeId] = $cndData[$id.':'.$this->typeId]; $row['condition'][0][$id.':'.$this->typeId] = $cndData[$id.':'.$this->typeId];
} }
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($lvData), 'data' => array_values($lvData),
'name' => '$LANG.tab_sells', 'name' => '$LANG.tab_sells',
'id' => 'currency-for', 'id' => 'currency-for',
@@ -750,7 +750,7 @@ class NpcPage extends GenericPage
if ($sf[4]) if ($sf[4])
$tabData['hiddenCols'] = $sf[4]; $tabData['hiddenCols'] = $sf[4];
$this->lvTabs[] = ['item', $tabData]; $this->lvTabs[] = [ItemList::$brickFile, $tabData];
} }
} }
@@ -797,14 +797,14 @@ class NpcPage extends GenericPage
} }
if ($_[0]) if ($_[0])
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($_[0]), 'data' => array_values($_[0]),
'name' => '$LANG.tab_starts', 'name' => '$LANG.tab_starts',
'id' => 'starts' 'id' => 'starts'
)]; )];
if ($_[1]) if ($_[1])
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($_[1]), 'data' => array_values($_[1]),
'name' => '$LANG.tab_ends', 'name' => '$LANG.tab_ends',
'id' => 'ends' 'id' => 'ends'
@@ -825,7 +825,7 @@ class NpcPage extends GenericPage
{ {
$this->extendGlobalData($objectiveOf->getJSGlobals()); $this->extendGlobalData($objectiveOf->getJSGlobals());
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($objectiveOf->getListviewData()), 'data' => array_values($objectiveOf->getListviewData()),
'name' => '$LANG.tab_objectiveof', 'name' => '$LANG.tab_objectiveof',
'id' => 'objective-of' 'id' => 'objective-of'
@@ -843,7 +843,7 @@ class NpcPage extends GenericPage
{ {
$this->extendGlobalData($crtOf->getJSGlobals()); $this->extendGlobalData($crtOf->getJSGlobals());
$this->lvTabs[] = ['achievement', array( $this->lvTabs[] = [AchievementList::$brickFile, array(
'data' => array_values($crtOf->getListviewData()), 'data' => array_values($crtOf->getListviewData()),
'name' => '$LANG.tab_criteriaof', 'name' => '$LANG.tab_criteriaof',
'id' => 'criteria-of' 'id' => 'criteria-of'
@@ -873,7 +873,7 @@ class NpcPage extends GenericPage
if (User::isInGroup(U_GROUP_STAFF)) if (User::isInGroup(U_GROUP_STAFF))
$tabData['extraCols'] = ["\$Listview.funcBox.createSimpleCol('seat', '".Lang::npc('seat')."', '10%', 'seat')"]; $tabData['extraCols'] = ["\$Listview.funcBox.createSimpleCol('seat', '".Lang::npc('seat')."', '10%', 'seat')"];
$this->lvTabs[] = ['creature', $tabData]; $this->lvTabs[] = [CreatureList::$brickFile, $tabData];
} }
} }
@@ -905,7 +905,7 @@ class NpcPage extends GenericPage
$tabData['visibleCols'] = ['activity']; $tabData['visibleCols'] = ['activity'];
$this->extendGlobalData($sounds->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($sounds->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['sound', $tabData]; $this->lvTabs[] = [SoundList::$brickFile, $tabData];
} }
} }
} }

View File

@@ -90,7 +90,7 @@ class NpcsPage extends GenericPage
if ($this->filterObj->error) if ($this->filterObj->error)
$tabData['_errors'] = 1; $tabData['_errors'] = 1;
$this->lvTabs[] = ['creature', $tabData]; $this->lvTabs[] = [CreatureList::$brickFile, $tabData];
} }
protected function postCache() protected function postCache()

View File

@@ -297,7 +297,7 @@ class ObjectPage extends GenericPage
{ {
$this->extendGlobalData($summons->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); $this->extendGlobalData($summons->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($summons->getListviewData()), 'data' => array_values($summons->getListviewData()),
'id' => 'summoned-by', 'id' => 'summoned-by',
'name' => '$LANG.tab_summonedby' 'name' => '$LANG.tab_summonedby'
@@ -316,7 +316,7 @@ class ObjectPage extends GenericPage
foreach ($data as $relId => $d) foreach ($data as $relId => $d)
$data[$relId]['trigger'] = array_search($relId, $_); $data[$relId]['trigger'] = array_search($relId, $_);
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($data), 'data' => array_values($data),
'id' => 'spells', 'id' => 'spells',
'name' => '$LANG.tab_spells', 'name' => '$LANG.tab_spells',
@@ -332,7 +332,7 @@ class ObjectPage extends GenericPage
{ {
$this->extendGlobalData($acvs->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); $this->extendGlobalData($acvs->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
$this->lvTabs[] = ['achievement', array( $this->lvTabs[] = [AchievementList::$brickFile, array(
'data' => array_values($acvs->getListviewData()), 'data' => array_values($acvs->getListviewData()),
'id' => 'criteria-of', 'id' => 'criteria-of',
'name' => '$LANG.tab_criteriaof' 'name' => '$LANG.tab_criteriaof'
@@ -358,14 +358,14 @@ class ObjectPage extends GenericPage
} }
if ($_[0]) if ($_[0])
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($_[0]), 'data' => array_values($_[0]),
'name' => '$LANG.tab_starts', 'name' => '$LANG.tab_starts',
'id' => 'starts' 'id' => 'starts'
)]; )];
if ($_[1]) if ($_[1])
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($_[1]), 'data' => array_values($_[1]),
'name' => '$LANG.tab_ends', 'name' => '$LANG.tab_ends',
'id' => 'ends' 'id' => 'ends'
@@ -380,7 +380,7 @@ class ObjectPage extends GenericPage
{ {
$this->extendGlobalData($relQuest->getJSGlobals()); $this->extendGlobalData($relQuest->getJSGlobals());
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($relQuest->getListviewData()), 'data' => array_values($relQuest->getListviewData()),
'name' => '$LANG.tab_quests', 'name' => '$LANG.tab_quests',
'id' => 'quests' 'id' => 'quests'
@@ -427,7 +427,7 @@ class ObjectPage extends GenericPage
if ($hiddenCols) if ($hiddenCols)
$tabData['hiddenCols'] = $hiddenCols; $tabData['hiddenCols'] = $hiddenCols;
$this->lvTabs[] = ['item', $tabData]; $this->lvTabs[] = [ItemList::$brickFile, $tabData];
} }
} }
@@ -476,7 +476,7 @@ class ObjectPage extends GenericPage
$tabData['_truncated'] = 1; $tabData['_truncated'] = 1;
} }
$this->lvTabs[] = ['spell', $tabData]; $this->lvTabs[] = [SpellList::$brickFile, $tabData];
} }
} }
@@ -486,7 +486,7 @@ class ObjectPage extends GenericPage
{ {
$this->extendGlobalData($sameModel->getJSGlobals()); $this->extendGlobalData($sameModel->getJSGlobals());
$this->lvTabs[] = ['object', array( $this->lvTabs[] = [GameObjectList::$brickFile, array(
'data' => array_values($sameModel->getListviewData()), 'data' => array_values($sameModel->getListviewData()),
'name' => '$LANG.tab_samemodelas', 'name' => '$LANG.tab_samemodelas',
'id' => 'same-model-as' 'id' => 'same-model-as'

View File

@@ -73,7 +73,7 @@ class ObjectsPage extends GenericPage
$tabData['_errors'] = 1; $tabData['_errors'] = 1;
} }
$this->lvTabs[] = ['object', $tabData]; $this->lvTabs[] = [GameObjectList::$brickFile, $tabData];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -95,7 +95,7 @@ class PetPage extends GenericPage
); );
$tng = new CreatureList($condition); $tng = new CreatureList($condition);
$this->lvTabs[] = ['creature', array( $this->lvTabs[] = [CreatureList::$brickFile, array(
'data' => array_values($tng->getListviewData(NPCINFO_TAMEABLE)), 'data' => array_values($tng->getListviewData(NPCINFO_TAMEABLE)),
'name' => '$LANG.tab_tameable', 'name' => '$LANG.tab_tameable',
'hiddenCols' => ['type'], 'hiddenCols' => ['type'],
@@ -117,7 +117,7 @@ class PetPage extends GenericPage
$food = new ItemList(array(['i.subClass', [5, 8]], ['i.FoodType', $list], CFG_SQL_LIMIT_NONE)); $food = new ItemList(array(['i.subClass', [5, 8]], ['i.FoodType', $list], CFG_SQL_LIMIT_NONE));
$this->extendGlobalData($food->getJSGlobals()); $this->extendGlobalData($food->getJSGlobals());
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($food->getListviewData()), 'data' => array_values($food->getListviewData()),
'name' => '$LANG.diet', 'name' => '$LANG.diet',
'hiddenCols' => ['source', 'slot', 'side'], 'hiddenCols' => ['source', 'slot', 'side'],
@@ -151,7 +151,7 @@ class PetPage extends GenericPage
$spells = new SpellList($conditions); $spells = new SpellList($conditions);
$this->extendGlobalData($spells->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($spells->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($spells->getListviewData()), 'data' => array_values($spells->getListviewData()),
'name' => '$LANG.tab_abilities', 'name' => '$LANG.tab_abilities',
'visibleCols' => ['schools', 'level'], 'visibleCols' => ['schools', 'level'],
@@ -178,7 +178,7 @@ class PetPage extends GenericPage
$talents = new SpellList($conditions); $talents = new SpellList($conditions);
$this->extendGlobalData($talents->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($talents->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($talents->getListviewData()), 'data' => array_values($talents->getListviewData()),
'visibleCols' => ['tier', 'level'], 'visibleCols' => ['tier', 'level'],
'name' => '$LANG.tab_talents', 'name' => '$LANG.tab_talents',

View File

@@ -51,7 +51,7 @@ class PetsPage extends GenericPage
if (!$pets->hasDiffFields(['type'])) if (!$pets->hasDiffFields(['type']))
$data['hiddenCols'] = ['type']; $data['hiddenCols'] = ['type'];
}; };
$this->lvTabs[] = ['pet', $data, 'petFoodCol']; $this->lvTabs[] = [PetList::$brickFile, $data, 'petFoodCol'];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -184,7 +184,7 @@ class ProfilesPage extends GenericPage
$this->roster = 0; $this->roster = 0;
$this->lvTabs[] = ['profile', $tabData]; $this->lvTabs[] = [ProfileList::$brickFile, $tabData];
} }
protected function postCache() protected function postCache()

View File

@@ -963,7 +963,7 @@ class QuestPage extends GenericPage
if (!$seeAlso->error) if (!$seeAlso->error)
{ {
$this->extendGlobalData($seeAlso->getJSGlobals()); $this->extendGlobalData($seeAlso->getJSGlobals());
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($seeAlso->getListviewData()), 'data' => array_values($seeAlso->getListviewData()),
'name' => '$LANG.tab_seealso', 'name' => '$LANG.tab_seealso',
'id' => 'see-also' 'id' => 'see-also'
@@ -975,7 +975,7 @@ class QuestPage extends GenericPage
if (!$criteriaOf->error) if (!$criteriaOf->error)
{ {
$this->extendGlobalData($criteriaOf->getJSGlobals()); $this->extendGlobalData($criteriaOf->getJSGlobals());
$this->lvTabs[] = ['achievement', array( $this->lvTabs[] = [AchievementList::$brickFile, array(
'data' => array_values($criteriaOf->getListviewData()), 'data' => array_values($criteriaOf->getListviewData()),
'name' => '$LANG.tab_criteriaof', 'name' => '$LANG.tab_criteriaof',
'id' => 'criteria-of' 'id' => 'criteria-of'
@@ -990,7 +990,7 @@ class QuestPage extends GenericPage
if (!$pooledQuests->error) if (!$pooledQuests->error)
{ {
$this->extendGlobalData($pooledQuests->getJSGlobals()); $this->extendGlobalData($pooledQuests->getJSGlobals());
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($pooledQuests->getListviewData()), 'data' => array_values($pooledQuests->getListviewData()),
'name' => 'Quest Pool', 'name' => 'Quest Pool',
'id' => 'quest-pool', 'id' => 'quest-pool',

View File

@@ -86,7 +86,7 @@ class QuestsPage extends GenericPage
if ($this->filterObj->error) if ($this->filterObj->error)
$tabData['_errors'] = 1; $tabData['_errors'] = 1;
$this->lvTabs[] = ['quest', $tabData]; $this->lvTabs[] = [QuestList::$brickFile, $tabData];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -109,7 +109,7 @@ class RacePage extends GenericPage
if (!$classes->error) if (!$classes->error)
{ {
$this->extendGlobalData($classes->getJSGlobals()); $this->extendGlobalData($classes->getJSGlobals());
$this->lvTabs[] = ['class', ['data' => array_values($classes->getListviewData())]]; $this->lvTabs[] = [CharClassList::$brickFile, ['data' => array_values($classes->getListviewData())]];
} }
// Tongues // Tongues
@@ -122,7 +122,7 @@ class RacePage extends GenericPage
if (!$tongues->error) if (!$tongues->error)
{ {
$this->extendGlobalData($tongues->getJSGlobals()); $this->extendGlobalData($tongues->getJSGlobals());
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($tongues->getListviewData()), 'data' => array_values($tongues->getListviewData()),
'id' => 'languages', 'id' => 'languages',
'name' => '$LANG.tab_languages', 'name' => '$LANG.tab_languages',
@@ -140,7 +140,7 @@ class RacePage extends GenericPage
if (!$racials->error) if (!$racials->error)
{ {
$this->extendGlobalData($racials->getJSGlobals()); $this->extendGlobalData($racials->getJSGlobals());
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($racials->getListviewData()), 'data' => array_values($racials->getListviewData()),
'id' => 'racial-traits', 'id' => 'racial-traits',
'name' => '$LANG.tab_racialtraits', 'name' => '$LANG.tab_racialtraits',
@@ -159,7 +159,7 @@ class RacePage extends GenericPage
if (!$quests->error) if (!$quests->error)
{ {
$this->extendGlobalData($quests->getJSGlobals()); $this->extendGlobalData($quests->getJSGlobals());
$this->lvTabs[] = ['quest', ['data' => array_values($quests->getListviewData())]]; $this->lvTabs[] = [QuestList::$brickFile, ['data' => array_values($quests->getListviewData())]];
} }
// Mounts // Mounts
@@ -176,7 +176,7 @@ class RacePage extends GenericPage
if (!$mounts->error) if (!$mounts->error)
{ {
$this->extendGlobalData($mounts->getJSGlobals()); $this->extendGlobalData($mounts->getJSGlobals());
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($mounts->getListviewData()), 'data' => array_values($mounts->getListviewData()),
'id' => 'mounts', 'id' => 'mounts',
'name' => '$LANG.tab_mounts', 'name' => '$LANG.tab_mounts',
@@ -195,7 +195,7 @@ class RacePage extends GenericPage
foreach ($data as $id => &$d) foreach ($data as $id => &$d)
$d['gender'] = $vo[$id]; $d['gender'] = $vo[$id];
$this->lvTabs[] = ['sound', array( $this->lvTabs[] = [SoundList::$brickFile, array(
'data' => array_values($data), 'data' => array_values($data),
'extraCols' => ['$Listview.templates.title.columns[1]'] 'extraCols' => ['$Listview.templates.title.columns[1]']
)]; )];

View File

@@ -35,7 +35,7 @@ class RacesPage extends GenericPage
if (!$races->error) if (!$races->error)
$data = array_values($races->getListviewData()); $data = array_values($races->getListviewData());
$this->lvTabs[] = ['race', ['data' => $data]]; $this->lvTabs[] = [CharRaceList::$brickFile, ['data' => $data]];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -177,7 +177,7 @@ class SearchPage extends GenericPage
if ($this->searchMask & SEARCH_TYPE_REGULAR) if ($this->searchMask & SEARCH_TYPE_REGULAR)
{ {
$foundTotal = 0; $foundTotal = 0;
foreach ($this->lvTabs as [$file, $tabData, , $osInfo]) foreach ($this->lvTabs as [, $tabData])
$foundTotal += count($tabData['data']); $foundTotal += count($tabData['data']);
if ($foundTotal == 1) // only one match -> redirect to find if ($foundTotal == 1) // only one match -> redirect to find
@@ -284,13 +284,13 @@ class SearchPage extends GenericPage
$this->performSearch(); $this->performSearch();
foreach ($this->lvTabs as [ , , , $osInfo]) foreach ($this->lvTabs as [, , , $osInfo])
$foundTotal += $osInfo[2]; $foundTotal += $osInfo[2];
if (!$foundTotal) if (!$foundTotal)
return Util::toJSON([$this->search, []]); return Util::toJSON([$this->search, []]);
foreach ($this->lvTabs as [ , $tabData, , $osInfo]) foreach ($this->lvTabs as [, $tabData, , $osInfo])
{ {
$max = max(1, intVal($limit * $osInfo[2] / $foundTotal)); $max = max(1, intVal($limit * $osInfo[2] / $foundTotal));
$limit -= $max; $limit -= $max;
@@ -392,7 +392,7 @@ class SearchPage extends GenericPage
$result['_truncated'] = 1; $result['_truncated'] = 1;
} }
return ['class', $result, null, $osInfo]; return [CharClassList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -418,7 +418,7 @@ class SearchPage extends GenericPage
$result['_truncated'] = 1; $result['_truncated'] = 1;
} }
return ['race', $result, null, $osInfo]; return [CharRaceList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -444,7 +444,7 @@ class SearchPage extends GenericPage
$result['_truncated'] = 1; $result['_truncated'] = 1;
} }
return ['title', $result, null, $osInfo]; return [TitleList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -477,7 +477,7 @@ class SearchPage extends GenericPage
$result['_truncated'] = 1; $result['_truncated'] = 1;
} }
return ['event', $result, null, $osInfo]; return [WorldEventList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -503,7 +503,7 @@ class SearchPage extends GenericPage
$result['_truncated'] = 1; $result['_truncated'] = 1;
} }
return ['currency', $result, null, $osInfo]; return [CurrencyList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -539,7 +539,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?itemsets&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?itemsets&filter=na='.urlencode($this->search).'\')';
return ['itemset', $result, null, $osInfo]; return [ItemsetList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -613,7 +613,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?items&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?items&filter=na='.urlencode($this->search).'\')';
return ['item', $result, null, $osInfo]; return [ItemList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -680,7 +680,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=7&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=7&filter=na='.urlencode($this->search).'\')';
return ['spell', $result, null, $osInfo]; return [SpellList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -731,7 +731,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=-2&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=-2&filter=na='.urlencode($this->search).'\')';
return ['spell', $result, null, $osInfo]; return [SpellList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -773,7 +773,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=-13&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=-13&filter=na='.urlencode($this->search).'\')';
return ['spell', $result, null, $osInfo]; return [SpellList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -815,7 +815,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=-11&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=-11&filter=na='.urlencode($this->search).'\')';
return ['spell', $result, null, $osInfo]; return [SpellList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -857,7 +857,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=11&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=11&filter=na='.urlencode($this->search).'\')';
return ['spell', $result, null, $osInfo]; return [SpellList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -899,7 +899,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=-6&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=-6&filter=na='.urlencode($this->search).'\')';
return ['spell', $result, null, $osInfo]; return [SpellList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -940,7 +940,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=-5&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=-5&filter=na='.urlencode($this->search).'\')';
return ['spell', $result, null, $osInfo]; return [SpellList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -975,7 +975,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?npcs&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?npcs&filter=na='.urlencode($this->search).'\')';
return ['creature', $result, null, $osInfo]; return [CreatureList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -1008,7 +1008,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?quests&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?quests&filter=na='.urlencode($this->search).'\')';
return ['quest', $result, null, $osInfo]; return [QuestList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -1048,7 +1048,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?achievements&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?achievements&filter=na='.urlencode($this->search).'\')';
return ['achievement', $result, null, $osInfo]; return [AchievementList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -1087,7 +1087,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?achievements=1&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?achievements=1&filter=na='.urlencode($this->search).'\')';
return ['achievement', $result, null, $osInfo]; return [AchievementList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -1112,7 +1112,7 @@ class SearchPage extends GenericPage
$result['_truncated'] = 1; $result['_truncated'] = 1;
} }
return ['zone', $result, null, $osInfo]; return [ZoneList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -1142,7 +1142,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?objects&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?objects&filter=na='.urlencode($this->search).'\')';
return ['object', $result, null, $osInfo]; return [GameObjectList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -1164,7 +1164,7 @@ class SearchPage extends GenericPage
$result['_truncated'] = 1; $result['_truncated'] = 1;
} }
return ['faction', $result, null, $osInfo]; return [FactionList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -1190,7 +1190,7 @@ class SearchPage extends GenericPage
$result['_truncated'] = 1; $result['_truncated'] = 1;
} }
return ['skill', $result, null, $osInfo]; return [SkillList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -1219,7 +1219,7 @@ class SearchPage extends GenericPage
$result['_truncated'] = 1; $result['_truncated'] = 1;
} }
return ['pet', $result, 'petFoodCol', $osInfo]; return [PetList::$brickFile, $result, 'petFoodCol', $osInfo];
} }
return false; return false;
@@ -1262,7 +1262,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=-8&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=-8&filter=na='.urlencode($this->search).'\')';
return ['spell', $result, null, $osInfo]; return [SpellList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -1310,7 +1310,7 @@ class SearchPage extends GenericPage
else else
$result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=0&filter=na='.urlencode($this->search).'\')'; $result['note'] = '$$WH.sprintf(LANG.lvnote_filterresults, \'?spells=0&filter=na='.urlencode($this->search).'\')';
return ['spell', $result, null, $osInfo]; return [SpellList::$brickFile, $result, null, $osInfo];
} }
return false; return false;
@@ -1329,7 +1329,7 @@ class SearchPage extends GenericPage
'name' => Util::ucFirst(Lang::game('emotes')) 'name' => Util::ucFirst(Lang::game('emotes'))
); );
return ['emote', $result, 'emote', $osInfo]; return [EmoteList::$brickFile, $result, 'emote', $osInfo];
} }
return false; return false;
@@ -1362,7 +1362,7 @@ class SearchPage extends GenericPage
$result['_truncated'] = 1; $result['_truncated'] = 1;
} }
return ['enchantment', $result, 'enchantment', $osInfo]; return [EnchantmentList::$brickFile, $result, 'enchantment', $osInfo];
} }
return false; return false;
@@ -1387,7 +1387,7 @@ class SearchPage extends GenericPage
$result['_truncated'] = 1; $result['_truncated'] = 1;
} }
return ['sound', $result, null, $osInfo]; return [SoundList::$brickFile, $result, null, $osInfo];
} }
return false; return false;

View File

@@ -90,7 +90,7 @@ class SkillPage extends GenericPage
{ {
$this->extendGlobalData($recipes->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); $this->extendGlobalData($recipes->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($recipes->getListviewData()), 'data' => array_values($recipes->getListviewData()),
'id' => 'recipes', 'id' => 'recipes',
'name' => '$LANG.tab_recipes', 'name' => '$LANG.tab_recipes',
@@ -121,7 +121,7 @@ class SkillPage extends GenericPage
if ($_ = array_search($this->typeId, $filterRecipe)) if ($_ = array_search($this->typeId, $filterRecipe))
$tabData['note'] = sprintf(Util::$filterResultString, "?items=9.".$_); $tabData['note'] = sprintf(Util::$filterResultString, "?items=9.".$_);
$this->lvTabs[] = ['item', $tabData]; $this->lvTabs[] = [ItemList::$brickFile, $tabData];
} }
// tab: crafted items [items] // tab: crafted items [items]
@@ -148,7 +148,7 @@ class SkillPage extends GenericPage
if ($_ = array_search($this->typeId, $filterItem)) if ($_ = array_search($this->typeId, $filterItem))
$tabData['note'] = sprintf(Util::$filterResultString, "?items&filter=cr=86;crs=".$_.";crv=0"); $tabData['note'] = sprintf(Util::$filterResultString, "?items&filter=cr=86;crs=".$_.";crv=0");
$this->lvTabs[] = ['item', $tabData]; $this->lvTabs[] = [ItemList::$brickFile, $tabData];
} }
} }
@@ -173,7 +173,7 @@ class SkillPage extends GenericPage
if ($_ = array_search($this->typeId, $filterItem)) if ($_ = array_search($this->typeId, $filterItem))
$tabData['note'] = sprintf(Util::$filterResultString, "?items&filter=99:168;crs=".$_.":2;crv=0:0"); $tabData['note'] = sprintf(Util::$filterResultString, "?items&filter=99:168;crs=".$_.":2;crv=0:0");
$this->lvTabs[] = ['item', $tabData]; $this->lvTabs[] = [ItemList::$brickFile, $tabData];
} }
// tab: required by [itemset] // tab: required by [itemset]
@@ -187,7 +187,7 @@ class SkillPage extends GenericPage
{ {
$this->extendGlobalData($reqBy->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($reqBy->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['itemset', array( $this->lvTabs[] = [ItemsetList::$brickFile, array(
'data' => array_values($reqBy->getListviewData()), 'data' => array_values($reqBy->getListviewData()),
'id' => 'required-by-set', 'id' => 'required-by-set',
'name' => '$LANG.tab_requiredby' 'name' => '$LANG.tab_requiredby'
@@ -243,7 +243,7 @@ class SkillPage extends GenericPage
break; break;
} }
$this->lvTabs[] = ['spell', $tabData]; $this->lvTabs[] = [SpellList::$brickFile, $tabData];
} }
// tab: trainers [npcs] // tab: trainers [npcs]
@@ -272,7 +272,7 @@ class SkillPage extends GenericPage
{ {
$this->extendGlobalData($trainer->getJSGlobals()); $this->extendGlobalData($trainer->getJSGlobals());
$this->lvTabs[] = ['creature', array( $this->lvTabs[] = [CreatureList::$brickFile, array(
'data' => array_values($trainer->getListviewData()), 'data' => array_values($trainer->getListviewData()),
'id' => 'trainer', 'id' => 'trainer',
'name' => '$LANG.tab_trainers', 'name' => '$LANG.tab_trainers',
@@ -287,17 +287,17 @@ class SkillPage extends GenericPage
$sort = 0; $sort = 0;
switch ($this->typeId) switch ($this->typeId)
{ {
case 182: $sort = 24; break; // Herbalism case SKILL_HERBALISM: $sort = 24; break;
case 356: $sort = 101; break; // Fishing case SKILL_FISHING: $sort = 101; break;
case 164: $sort = 121; break; // Blacksmithing case SKILL_BLACKSMITHING: $sort = 121; break;
case 171: $sort = 181; break; // Alchemy case SKILL_ALCHEMY: $sort = 181; break;
case 165: $sort = 182; break; // Leatherworking case SKILL_LEATHERWORKING: $sort = 182; break;
case 202: $sort = 201; break; // Engineering case SKILL_ENGINEERING: $sort = 201; break;
case 197: $sort = 264; break; // Tailoring case SKILL_TAILORING: $sort = 264; break;
case 185: $sort = 304; break; // Cooking case SKILL_COOKING: $sort = 304; break;
case 129: $sort = 324; break; // First Aid case SKILL_FIRST_AID: $sort = 324; break;
case 773: $sort = 371; break; // Inscription case SKILL_INSCRIPTION: $sort = 371; break;
case 755: $sort = 373; break; // Jewelcrafting case SKILL_JEWELCRAFTING: $sort = 373; break;
} }
if ($sort) if ($sort)
@@ -306,7 +306,7 @@ class SkillPage extends GenericPage
if (!$quests->error) if (!$quests->error)
{ {
$this->extendGlobalData($quests->getJSGlobals()); $this->extendGlobalData($quests->getJSGlobals());
$this->lvTabs[] = ['quest', ['data' => array_values($quests->getListviewData())]]; $this->lvTabs[] = [QuestList::$brickFile, ['data' => array_values($quests->getListviewData())]];
} }
} }
} }
@@ -321,7 +321,7 @@ class SkillPage extends GenericPage
{ {
$classes = new CharClassList(array(['id', $class])); $classes = new CharClassList(array(['id', $class]));
if (!$classes->error) if (!$classes->error)
$this->lvTabs[] = ['class', ['data' => array_values($classes->getListviewData())]]; $this->lvTabs[] = [CharClassList::$brickFile, ['data' => array_values($classes->getListviewData())]];
} }
// tab: related races (apply races from [spells]) // tab: related races (apply races from [spells])
@@ -334,7 +334,7 @@ class SkillPage extends GenericPage
{ {
$races = new CharRaceList(array(['id', $race])); $races = new CharRaceList(array(['id', $race]));
if (!$races->error) if (!$races->error)
$this->lvTabs[] = ['race', ['data' => array_values($races->getListviewData())]]; $this->lvTabs[] = [CharRaceList::$brickFile, ['data' => array_values($races->getListviewData())]];
} }
} }
} }

View File

@@ -38,7 +38,7 @@ class SkillsPage extends GenericPage
$skills = new SkillList($conditions); $skills = new SkillList($conditions);
$this->lvTabs[] = ['skill', ['data' => array_values($skills->getListviewData())]]; $this->lvTabs[] = [SkillList::$brickFile, ['data' => array_values($skills->getListviewData())]];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -160,12 +160,8 @@ class SoundPage extends GenericPage
$spells = new SpellList($cnd); $spells = new SpellList($cnd);
if (!$spells->error) if (!$spells->error)
{ {
$data = $spells->getListviewData();
$this->extendGlobalData($spells->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($spells->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = [SpellList::$brickFile, ['data' => array_values($spells->getListviewData())]];
$this->lvTabs[] = ['spell', array(
'data' => array_values($data),
)];
} }
@@ -198,7 +194,7 @@ class SoundPage extends GenericPage
if (!$items->error) if (!$items->error)
{ {
$this->extendGlobalData($items->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($items->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['item', ['data' => array_values($items->getListviewData())]]; $this->lvTabs[] = [ItemList::$brickFile, ['data' => array_values($items->getListviewData())]];
} }
} }
@@ -256,7 +252,7 @@ class SoundPage extends GenericPage
$tabData['data'] = array_values($zoneData); $tabData['data'] = array_values($zoneData);
$tabData['hiddenCols'] = ['territory']; $tabData['hiddenCols'] = ['territory'];
$this->lvTabs[] = ['zone', $tabData]; $this->lvTabs[] = [ZoneList::$brickFile, $tabData];
} }
} }
@@ -268,7 +264,7 @@ class SoundPage extends GenericPage
if (!$races->error) if (!$races->error)
{ {
$this->extendGlobalData($races->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($races->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['race', ['data' => array_values($races->getListviewData())]]; $this->lvTabs[] = [CharRaceList::$brickFile, ['data' => array_values($races->getListviewData())]];
} }
} }
@@ -280,7 +276,7 @@ class SoundPage extends GenericPage
if (!$races->error) if (!$races->error)
{ {
$this->extendGlobalData($races->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($races->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['emote', array( $this->lvTabs[] = [EmoteList::$brickFile, array(
'data' => array_values($races->getListviewData()), 'data' => array_values($races->getListviewData()),
'name' => Util::ucFirst(Lang::game('emotes')) 'name' => Util::ucFirst(Lang::game('emotes'))
), 'emote']; ), 'emote'];
@@ -350,7 +346,7 @@ class SoundPage extends GenericPage
$this->addScript([SC_JS_FILE, '?data=zones']); $this->addScript([SC_JS_FILE, '?data=zones']);
$this->extendGlobalData($npcs->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($npcs->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['creature', ['data' => array_values($npcs->getListviewData())]]; $this->lvTabs[] = [CreatureList::$brickFile, ['data' => array_values($npcs->getListviewData())]];
} }
} }
} }

View File

@@ -63,7 +63,7 @@ class SoundsPage extends GenericPage
if ($this->filterObj->error) if ($this->filterObj->error)
$tabData['_errors'] = 1; $tabData['_errors'] = 1;
} }
$this->lvTabs[] = ['sound', $tabData]; $this->lvTabs[] = [SoundList::$brickFile, $tabData];
} }
protected function postCache() protected function postCache()

View File

@@ -352,7 +352,7 @@ class SpellPage extends GenericPage
if (!$abilities->hasSetFields(['skillLines'])) if (!$abilities->hasSetFields(['skillLines']))
$tabData['hiddenCols'] = ['skill']; $tabData['hiddenCols'] = ['skill'];
$this->lvTabs[] = ['spell', $tabData]; $this->lvTabs[] = [SpellList::$brickFile, $tabData];
$this->extendGlobalData($abilities->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($abilities->getJSGlobals(GLOBALINFO_SELF));
} }
@@ -399,7 +399,7 @@ class SpellPage extends GenericPage
if (!$modSpells->hasSetFields(['skillLines'])) if (!$modSpells->hasSetFields(['skillLines']))
$tabData['hiddenCols'] = ['skill']; $tabData['hiddenCols'] = ['skill'];
$this->lvTabs[] = ['spell', $tabData]; $this->lvTabs[] = [SpellList::$brickFile, $tabData];
$this->extendGlobalData($modSpells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); $this->extendGlobalData($modSpells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
} }
@@ -448,7 +448,7 @@ class SpellPage extends GenericPage
if (!$modsSpell->hasSetFields(['skillLines'])) if (!$modsSpell->hasSetFields(['skillLines']))
$tabData['hiddenCols'] = ['skill']; $tabData['hiddenCols'] = ['skill'];
$this->lvTabs[] = ['spell', $tabData]; $this->lvTabs[] = [SpellList::$brickFile, $tabData];
$this->extendGlobalData($modsSpell->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); $this->extendGlobalData($modsSpell->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
} }
@@ -513,7 +513,7 @@ class SpellPage extends GenericPage
if (isset($saE)) if (isset($saE))
$tabData['extraCols'] = $saE; $tabData['extraCols'] = $saE;
$this->lvTabs[] = ['spell', $tabData]; $this->lvTabs[] = [SpellList::$brickFile, $tabData];
$this->extendGlobalData($saSpells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); $this->extendGlobalData($saSpells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
} }
@@ -534,7 +534,7 @@ class SpellPage extends GenericPage
$cdSpells = new SpellList($conditions); $cdSpells = new SpellList($conditions);
if (!$cdSpells->error) if (!$cdSpells->error)
{ {
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($cdSpells->getListviewData()), 'data' => array_values($cdSpells->getListviewData()),
'name' => '$LANG.tab_sharedcooldown', 'name' => '$LANG.tab_sharedcooldown',
'id' => 'shared-cooldown' 'id' => 'shared-cooldown'
@@ -556,7 +556,7 @@ class SpellPage extends GenericPage
$ubSpells = new SpellList($conditions); $ubSpells = new SpellList($conditions);
if (!$ubSpells->error) if (!$ubSpells->error)
{ {
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($ubSpells->getListviewData()), 'data' => array_values($ubSpells->getListviewData()),
'id' => 'used-by-spell', 'id' => 'used-by-spell',
'name' => '$LANG.tab_usedby' 'name' => '$LANG.tab_usedby'
@@ -577,7 +577,7 @@ class SpellPage extends GenericPage
$ubSets = new ItemsetList($conditions); $ubSets = new ItemsetList($conditions);
if (!$ubSets->error) if (!$ubSets->error)
{ {
$this->lvTabs[] = ['itemset', array( $this->lvTabs[] = [ItemsetList::$brickFile, array(
'data' => array_values($ubSets->getListviewData()), 'data' => array_values($ubSets->getListviewData()),
'id' => 'used-by-itemset', 'id' => 'used-by-itemset',
'name' => '$LANG.tab_usedby' 'name' => '$LANG.tab_usedby'
@@ -599,7 +599,7 @@ class SpellPage extends GenericPage
$ubItems = new ItemList($conditions); $ubItems = new ItemList($conditions);
if (!$ubItems->error) if (!$ubItems->error)
{ {
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($ubItems->getListviewData()), 'data' => array_values($ubItems->getListviewData()),
'id' => 'used-by-item', 'id' => 'used-by-item',
'name' => '$LANG.tab_usedby' 'name' => '$LANG.tab_usedby'
@@ -620,7 +620,7 @@ class SpellPage extends GenericPage
$ubObjects = new GameObjectList($conditions); $ubObjects = new GameObjectList($conditions);
if (!$ubObjects->error) if (!$ubObjects->error)
{ {
$this->lvTabs[] = ['object', array( $this->lvTabs[] = [GameObjectList::$brickFile, array(
'data' => array_values($ubObjects->getListviewData()), 'data' => array_values($ubObjects->getListviewData()),
'id' => 'used-by-object', 'id' => 'used-by-object',
'name' => '$LANG.tab_usedby' 'name' => '$LANG.tab_usedby'
@@ -637,7 +637,7 @@ class SpellPage extends GenericPage
$ubTriggers = new AreaTriggerList(array(['id', $ubSAI[Type::AREATRIGGER]])); $ubTriggers = new AreaTriggerList(array(['id', $ubSAI[Type::AREATRIGGER]]));
if (!$ubTriggers->error) if (!$ubTriggers->error)
{ {
$this->lvTabs[] = ['areatrigger', array( $this->lvTabs[] = [AreaTriggerList::$brickFile, array(
'data' => array_values($ubTriggers->getListviewData()), 'data' => array_values($ubTriggers->getListviewData()),
'id' => 'used-by-areatrigger', 'id' => 'used-by-areatrigger',
'name' => '$LANG.tab_usedby' 'name' => '$LANG.tab_usedby'
@@ -656,7 +656,7 @@ class SpellPage extends GenericPage
$coAchievemnts = new AchievementList($conditions); $coAchievemnts = new AchievementList($conditions);
if (!$coAchievemnts->error) if (!$coAchievemnts->error)
{ {
$this->lvTabs[] = ['achievement', array( $this->lvTabs[] = [AchievementList::$brickFile, array(
'data' => array_values($coAchievemnts->getListviewData()), 'data' => array_values($coAchievemnts->getListviewData()),
'id' => 'criteria-of', 'id' => 'criteria-of',
'name' => '$LANG.tab_criteriaof' 'name' => '$LANG.tab_criteriaof'
@@ -699,7 +699,7 @@ class SpellPage extends GenericPage
} }
} }
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($lv), 'data' => array_values($lv),
'name' => '$LANG.tab_contains', 'name' => '$LANG.tab_contains',
'id' => 'contains', 'id' => 'contains',
@@ -767,7 +767,7 @@ class SpellPage extends GenericPage
if (isset($sH)) if (isset($sH))
$tabData['hiddenCols'] = $sH; $tabData['hiddenCols'] = $sH;
$this->lvTabs[] = ['spell', $tabData]; $this->lvTabs[] = [SpellList::$brickFile, $tabData];
$this->extendGlobalData($stacks->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); $this->extendGlobalData($stacks->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
} }
@@ -811,7 +811,7 @@ class SpellPage extends GenericPage
} }
} }
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($data), 'data' => array_values($data),
'id' => 'spell-link', 'id' => 'spell-link',
'name' => Lang::spell('linkedWith'), 'name' => Lang::spell('linkedWith'),
@@ -834,7 +834,7 @@ class SpellPage extends GenericPage
$trigger = new SpellList($conditions); $trigger = new SpellList($conditions);
if (!$trigger->error) if (!$trigger->error)
{ {
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($trigger->getListviewData()), 'data' => array_values($trigger->getListviewData()),
'id' => 'triggered-by', 'id' => 'triggered-by',
'name' => '$LANG.tab_triggeredby' 'name' => '$LANG.tab_triggeredby'
@@ -858,7 +858,7 @@ class SpellPage extends GenericPage
$ubCreature = new CreatureList($conditions); $ubCreature = new CreatureList($conditions);
if (!$ubCreature->error) if (!$ubCreature->error)
{ {
$this->lvTabs[] = ['creature', array( $this->lvTabs[] = [CreatureList::$brickFile, array(
'data' => array_values($ubCreature->getListviewData()), 'data' => array_values($ubCreature->getListviewData()),
'id' => 'used-by-npc', 'id' => 'used-by-npc',
'name' => '$LANG.tab_usedby' 'name' => '$LANG.tab_usedby'
@@ -1013,7 +1013,7 @@ class SpellPage extends GenericPage
$tabData['hiddenCols'] = ['instancetype']; $tabData['hiddenCols'] = ['instancetype'];
} }
$this->lvTabs[] = ['zone', $tabData]; $this->lvTabs[] = [ZoneList::$brickFile, $tabData];
} }
} }
@@ -1045,7 +1045,7 @@ class SpellPage extends GenericPage
if (!$teaches->hasSetFields(['skillLines'])) if (!$teaches->hasSetFields(['skillLines']))
$tabData['hiddenCols'] = ['skill']; $tabData['hiddenCols'] = ['skill'];
$this->lvTabs[] = ['spell', $tabData]; $this->lvTabs[] = [SpellList::$brickFile, $tabData];
} }
} }
@@ -1073,7 +1073,7 @@ class SpellPage extends GenericPage
if (!$tbTrainer->error) if (!$tbTrainer->error)
{ {
$this->extendGlobalData($tbTrainer->getJSGlobals()); $this->extendGlobalData($tbTrainer->getJSGlobals());
$this->lvTabs[] = ['creature', array( $this->lvTabs[] = [CreatureList::$brickFile, array(
'data' => array_values($tbTrainer->getListviewData()), 'data' => array_values($tbTrainer->getListviewData()),
'id' => 'taught-by-npc', 'id' => 'taught-by-npc',
'name' => '$LANG.tab_taughtby', 'name' => '$LANG.tab_taughtby',
@@ -1095,7 +1095,7 @@ class SpellPage extends GenericPage
if (!$tbSpell->error) if (!$tbSpell->error)
{ {
$tbsData = $tbSpell->getListviewData(); $tbsData = $tbSpell->getListviewData();
$this->lvTabs[] = ['spell', array( $this->lvTabs[] = [SpellList::$brickFile, array(
'data' => array_values($tbsData), 'data' => array_values($tbsData),
'id' => 'taught-by-spell', 'id' => 'taught-by-spell',
'name' => '$LANG.tab_taughtby' 'name' => '$LANG.tab_taughtby'
@@ -1118,7 +1118,7 @@ class SpellPage extends GenericPage
$tbQuest = new QuestList($conditions); $tbQuest = new QuestList($conditions);
if (!$tbQuest->error) if (!$tbQuest->error)
{ {
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($tbQuest->getListviewData()), 'data' => array_values($tbQuest->getListviewData()),
'id' => 'reward-from-quest', 'id' => 'reward-from-quest',
'name' => '$LANG.tab_rewardfrom' 'name' => '$LANG.tab_rewardfrom'
@@ -1140,7 +1140,7 @@ class SpellPage extends GenericPage
$tbItem = new ItemList($conditions); $tbItem = new ItemList($conditions);
if (!$tbItem->error) if (!$tbItem->error)
{ {
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($tbItem->getListviewData()), 'data' => array_values($tbItem->getListviewData()),
'id' => 'taught-by-item', 'id' => 'taught-by-item',
'name' => '$LANG.tab_taughtby' 'name' => '$LANG.tab_taughtby'
@@ -1159,7 +1159,7 @@ class SpellPage extends GenericPage
$enchList = new EnchantmentList($conditions); $enchList = new EnchantmentList($conditions);
if (!$enchList->error) if (!$enchList->error)
{ {
$this->lvTabs[] = ['enchantment', array( $this->lvTabs[] = [EnchantmentList::$brickFile, array(
'data' => array_values($enchList->getListviewData()), 'data' => array_values($enchList->getListviewData()),
'name' => Util::ucFirst(Lang::game('enchantments')) 'name' => Util::ucFirst(Lang::game('enchantments'))
), 'enchantment']; ), 'enchantment'];
@@ -1191,7 +1191,7 @@ class SpellPage extends GenericPage
$tabData['visibleCols'] = ['activity']; $tabData['visibleCols'] = ['activity'];
$this->extendGlobalData($sounds->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($sounds->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['sound', $tabData]; $this->lvTabs[] = [SoundList::$brickFile, $tabData];
} }
} }

View File

@@ -463,7 +463,7 @@ class SpellsPage extends GenericPage
if ($hiddenCols) if ($hiddenCols)
$tabData['hiddenCols'] = array_unique($hiddenCols); $tabData['hiddenCols'] = array_unique($hiddenCols);
$this->lvTabs[] = ['spell', $tabData]; $this->lvTabs[] = [SpellList::$brickFile, $tabData];
} }
protected function postCache() protected function postCache()

View File

@@ -104,7 +104,7 @@ class TitlePage extends GenericPage
{ {
$this->extendGlobalData($quests->getJSGlobals(GLOBALINFO_REWARDS)); $this->extendGlobalData($quests->getJSGlobals(GLOBALINFO_REWARDS));
$this->lvTabs[] = ['quest', array( $this->lvTabs[] = [QuestList::$brickFile, array(
'data' => array_values($quests->getListviewData()), 'data' => array_values($quests->getListviewData()),
'id' => 'reward-from-quest', 'id' => 'reward-from-quest',
'name' => '$LANG.tab_rewardfrom', 'name' => '$LANG.tab_rewardfrom',
@@ -121,7 +121,7 @@ class TitlePage extends GenericPage
{ {
$this->extendGlobalData($acvs->getJSGlobals()); $this->extendGlobalData($acvs->getJSGlobals());
$this->lvTabs[] = ['achievement', array( $this->lvTabs[] = [AchievementList::$brickFile, array(
'data' => array_values($acvs->getListviewData()), 'data' => array_values($acvs->getListviewData()),
'id' => 'reward-from-achievement', 'id' => 'reward-from-achievement',
'name' => '$LANG.tab_rewardfrom', 'name' => '$LANG.tab_rewardfrom',

View File

@@ -49,7 +49,7 @@ class TitlesPage extends GenericPage
$tabData['hiddenCols'] = ['source']; $tabData['hiddenCols'] = ['source'];
} }
$this->lvTabs[] = ['title', $tabData]; $this->lvTabs[] = [TitleList::$brickFile, $tabData];
} }
protected function generateTitle() protected function generateTitle()

View File

@@ -523,7 +523,7 @@ class ZonePage extends GenericPage
$this->extendGlobalData($creatureSpawns->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($creatureSpawns->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['creature', $tabData]; $this->lvTabs[] = [CreatureList::$brickFile, $tabData];
} }
// tab: Objects // tab: Objects
@@ -539,7 +539,7 @@ class ZonePage extends GenericPage
$this->extendGlobalData($objectSpawns->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($objectSpawns->getJSGlobals(GLOBALINFO_SELF));
$this->lvTabs[] = ['object', $tabData]; $this->lvTabs[] = [GameObjectList::$brickFile, $tabData];
} }
$quests = new QuestList(array(['zoneOrSort', $this->typeId])); $quests = new QuestList(array(['zoneOrSort', $this->typeId]));
@@ -561,18 +561,18 @@ class ZonePage extends GenericPage
// tab: Quests [including data collected by SOM-routine] // tab: Quests [including data collected by SOM-routine]
if ($questsLV) if ($questsLV)
{ {
$tabData = ['quest', ['data' => array_values($questsLV)]]; $tabData = ['data' => array_values($questsLV)];
foreach (Game::$questClasses as $parent => $children) foreach (Game::$questClasses as $parent => $children)
{ {
if (!in_array($this->typeId, $children)) if (!in_array($this->typeId, $children))
continue; continue;
$tabData[1]['note'] = '$$WH.sprintf(LANG.lvnote_zonequests, '.$parent.', '.$this->typeId.',"'.$this->subject->getField('name', true).'", '.$this->typeId.')'; $tabData['note'] = '$$WH.sprintf(LANG.lvnote_zonequests, '.$parent.', '.$this->typeId.',"'.$this->subject->getField('name', true).'", '.$this->typeId.')';
break; break;
} }
$this->lvTabs[] = $tabData; $this->lvTabs[] = [QuestList::$brickFile, $tabData];
} }
// tab: item-quest starter // tab: item-quest starter
@@ -591,7 +591,7 @@ class ZonePage extends GenericPage
$qsiList = new ItemList(array(['id', array_keys($questStartItem)])); $qsiList = new ItemList(array(['id', array_keys($questStartItem)]));
if (!$qsiList->error) if (!$qsiList->error)
{ {
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($qsiList->getListviewData()), 'data' => array_values($qsiList->getListviewData()),
'name' => '$LANG.tab_startsquest', 'name' => '$LANG.tab_startsquest',
'id' => 'starts-quest' 'id' => 'starts-quest'
@@ -607,7 +607,7 @@ class ZonePage extends GenericPage
$rewards = new ItemList(array(['id', array_unique($rewardsLV)])); $rewards = new ItemList(array(['id', array_unique($rewardsLV)]));
if (!$rewards->error) if (!$rewards->error)
{ {
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($rewards->getListviewData()), 'data' => array_values($rewards->getListviewData()),
'name' => '$LANG.tab_questrewards', 'name' => '$LANG.tab_questrewards',
'id' => 'quest-rewards', 'id' => 'quest-rewards',
@@ -643,7 +643,7 @@ class ZonePage extends GenericPage
if ($skill = DB::World()->selectCell('SELECT `skill` FROM skill_fishing_base_level WHERE `entry` = ?d', $this->typeId)) if ($skill = DB::World()->selectCell('SELECT `skill` FROM skill_fishing_base_level WHERE `entry` = ?d', $this->typeId))
$note = '<b class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, \''.Lang::zone('fishingSkill').'\', 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()">'.Lang::formatSkillBreakpoints(Game::getBreakpointsForSkill(SKILL_FISHING, $skill), Lang::FMT_HTML).'</b>'; $note = '<b class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, \''.Lang::zone('fishingSkill').'\', 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()">'.Lang::formatSkillBreakpoints(Game::getBreakpointsForSkill(SKILL_FISHING, $skill), Lang::FMT_HTML).'</b>';
$this->lvTabs[] = ['item', array( $this->lvTabs[] = [ItemList::$brickFile, array(
'data' => array_values($fish->getResult()), 'data' => array_values($fish->getResult()),
'name' => '$LANG.tab_fishing', 'name' => '$LANG.tab_fishing',
'id' => 'fishing', 'id' => 'fishing',
@@ -750,7 +750,7 @@ class ZonePage extends GenericPage
if ($extra) if ($extra)
$tabData['extraCols'] = ['$Listview.extraCols.condition']; $tabData['extraCols'] = ['$Listview.extraCols.condition'];
$this->lvTabs[] = ['spell', $tabData]; $this->lvTabs[] = [SpellList::$brickFile, $tabData];
} }
} }
@@ -758,7 +758,7 @@ class ZonePage extends GenericPage
$subZones = new ZoneList(array(['parentArea', $this->typeId])); $subZones = new ZoneList(array(['parentArea', $this->typeId]));
if (!$subZones->error) if (!$subZones->error)
{ {
$this->lvTabs[] = ['zone', array( $this->lvTabs[] = [ZoneList::$brickFile, array(
'data' => array_values($subZones->getListviewData()), 'data' => array_values($subZones->getListviewData()),
'name' => '$LANG.tab_zones', 'name' => '$LANG.tab_zones',
'id' => 'subzones', 'id' => 'subzones',
@@ -816,7 +816,7 @@ class ZonePage extends GenericPage
$tabData['data'] = array_values($data); $tabData['data'] = array_values($data);
$this->lvTabs[] = ['sound', $tabData]; $this->lvTabs[] = [SoundList::$brickFile, $tabData];
$this->extendGlobalData($music->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($music->getJSGlobals(GLOBALINFO_SELF));

View File

@@ -83,7 +83,7 @@ class ZonesPage extends GenericPage
$tabData['hiddenCols'] = $hiddenCols; $tabData['hiddenCols'] = $hiddenCols;
$this->map = null; $this->map = null;
$this->lvTabs[] = ['zone', $tabData]; $this->lvTabs[] = [ZoneList::$brickFile, $tabData];
// create flight map // create flight map
if ($mapFile) if ($mapFile)

View File

@@ -12,12 +12,12 @@ if (!empty($this->lvTabs) || !empty($this->user['characterData']) || !empty($thi
<div id="tabs-generic"></div> <div id="tabs-generic"></div>
<?php endif; ?> <?php endif; ?>
<div id="lv-generic" class="listview"><?php <div id="lv-generic" class="listview"><?php
foreach ($this->lvTabs as $lv): foreach ($this->lvTabs as [$tplName, $tabData]):
if ($lv[0]): if ($tplName):
continue; continue;
endif; endif;
echo '<div class="text tabbed-contents" id="tab-'.$lv[1]['id'].'" style="display:none;">'.$lv[1]['data'].'</div>'; echo '<div class="text tabbed-contents" id="tab-'.$tabData['id'].'" style="display:none;">'.$tabData['data'].'</div>';
endforeach; endforeach;
?></div> ?></div>
<script type="text/javascript">//<![CDATA[ <script type="text/javascript">//<![CDATA[
@@ -30,28 +30,30 @@ if (!empty($this->lvTabs) || !empty($this->user['characterData']) || !empty($thi
echo " var ".$tabVar." = new Tabs({parent: \$WH.ge('tabs-generic')".(isset($this->type) ? ", trackable: '".ucfirst(Type::getFileString($this->type)."'") : null)."});\n"; echo " var ".$tabVar." = new Tabs({parent: \$WH.ge('tabs-generic')".(isset($this->type) ? ", trackable: '".ucfirst(Type::getFileString($this->type)."'") : null)."});\n";
endif; endif;
foreach ($this->lvTabs as $lv): foreach ($this->lvTabs as [$tplName, $tabData, $include]):
if (!empty($lv[1]['data']) || (count($this->lvTabs) == 1 && !$relTabs)): if (empty($tabData['data']) && $relTabs && count($this->lvTabs) != 1):
continue;
endif;
if ($isTabbed): if ($isTabbed):
$lv[1]['tabs'] = '$'.$tabVar; $tabData['tabs'] = '$'.$tabVar;
endif; endif;
if ($lv[0]): if ($tplName):
// extra functions on top of lv // extra functions on top of lv
if (isset($lv[2])): if (isset($include)):
$this->lvBrick($lv[2]); $this->lvBrick($include);
endif; endif;
if (isset($this->lvTemplates[$lv[0]])): if (isset($this->lvTemplates[$tplName])):
echo "new Listview(".Util::toJSON(array_merge($this->lvTemplates[$lv[0]], $lv[1])).");\n"; echo "new Listview(".Util::toJSON(array_merge($this->lvTemplates[$tplName], $tabData)).");\n";
else: else:
// does not appear as announcement, those have already been handled at this point // does not appear as announcement, those have already been handled at this point
trigger_error('requested undefined listview: '.$lv[0], E_USER_ERROR); trigger_error('requested undefined listview: '.$tplName, E_USER_ERROR);
endif; endif;
elseif ($isTabbed): elseif ($isTabbed):
$n = $lv[1]['name'][0] == '$' ? substr($lv[1]['name'], 1) : "'".$lv[1]['name']."'"; $n = $tabData['name'][0] == '$' ? substr($tabData['name'], 1) : "'".$tabData['name']."'";
echo $tabVar.".add(".$n.", { id: '".$lv[1]['id']."' });\n"; echo $tabVar.".add(".$n.", { id: '".$tabData['id']."' });\n";
endif;
endif; endif;
endforeach; endforeach;