diff --git a/pages/achievements.php b/pages/achievements.php index 805fbf0e..51c5ca13 100644 --- a/pages/achievements.php +++ b/pages/achievements.php @@ -55,6 +55,9 @@ class AchievementsPage extends GenericPage { $conditions = []; + if (!User::isInGroup(U_GROUP_EMPLOYEE)) + $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; + // include child categories if current category is empty if ($this->category) $conditions[] = ['category', (int)end($this->category)]; diff --git a/pages/currencies.php b/pages/currencies.php index 2d66b59e..b718b12f 100644 --- a/pages/currencies.php +++ b/pages/currencies.php @@ -29,6 +29,10 @@ class CurrenciesPage extends GenericPage protected function generateContent() { $conditions = []; + + if (!User::isInGroup(U_GROUP_EMPLOYEE)) + $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; + if ($this->category) $conditions[] = ['category', (int)$this->category[0]]; diff --git a/pages/events.php b/pages/events.php index 5d342c7c..280135f3 100644 --- a/pages/events.php +++ b/pages/events.php @@ -30,6 +30,9 @@ class EventsPage extends GenericPage { $condition = []; + if (!User::isInGroup(U_GROUP_EMPLOYEE)) + $condition[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; + if ($this->category) { switch ($this->category[0]) diff --git a/pages/items.php b/pages/items.php index b132b205..9e644c98 100644 --- a/pages/items.php +++ b/pages/items.php @@ -96,6 +96,9 @@ class ItemsPage extends GenericPage $conditions = []; + if (!User::isInGroup(U_GROUP_EMPLOYEE)) + $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; + /*******************/ /* evaluate filter */ /*******************/ diff --git a/pages/itemsets.php b/pages/itemsets.php index b10f90d3..1ed6014b 100644 --- a/pages/itemsets.php +++ b/pages/itemsets.php @@ -29,7 +29,15 @@ class ItemsetsPage extends GenericPage protected function generateContent() { - $itemsets = new ItemsetList($this->filterObj->getConditions()); + $conditions = []; + + if (!User::isInGroup(U_GROUP_EMPLOYEE)) + $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; + + if ($_ = $this->filterObj->getConditions()) + $conditions[] = $_; + + $itemsets = new ItemsetList($conditions); $this->extendGlobalData($itemsets->getJSGlobals()); // recreate form selection diff --git a/pages/npcs.php b/pages/npcs.php index 0d147416..5abae9fb 100644 --- a/pages/npcs.php +++ b/pages/npcs.php @@ -33,6 +33,9 @@ class NpcsPage extends GenericPage { $conditions = []; + if (!User::isInGroup(U_GROUP_EMPLOYEE)) + $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; + if ($this->category) { $conditions[] = ['type', $this->category[0]]; diff --git a/pages/objects.php b/pages/objects.php index 3fad2fc1..c01e87fd 100644 --- a/pages/objects.php +++ b/pages/objects.php @@ -33,6 +33,9 @@ class ObjectsPage extends GenericPage { $conditions = []; + if (!User::isInGroup(U_GROUP_EMPLOYEE)) + $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; + if ($this->category) $conditions[] = ['typeCat', (int)$this->category[0]]; diff --git a/pages/pets.php b/pages/pets.php index d27e3899..b2288a7a 100644 --- a/pages/pets.php +++ b/pages/pets.php @@ -29,6 +29,10 @@ class PetsPage extends GenericPage protected function generateContent() { $conditions = []; + + if (!User::isInGroup(U_GROUP_EMPLOYEE)) + $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; + if ($this->category) $conditions[] = ['type', (int)$this->category[0]]; diff --git a/pages/quests.php b/pages/quests.php index e524e9d4..7b8c8475 100644 --- a/pages/quests.php +++ b/pages/quests.php @@ -34,7 +34,9 @@ class QuestsPage extends GenericPage { $conditions = []; - // cnd + if (!User::isInGroup(U_GROUP_EMPLOYEE)) + $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; + if (isset($this->category[1])) $conditions[] = ['zoneOrSort', $this->category[1]]; else if (isset($this->category[0])) diff --git a/pages/races.php b/pages/races.php index 576b3cb4..33d6edea 100644 --- a/pages/races.php +++ b/pages/races.php @@ -25,7 +25,12 @@ class RacesPage extends GenericPage protected function generateContent() { - $races = new CharRaceList(array(['side', 0, '!'])); + $conditions = []; + + if (!User::isInGroup(U_GROUP_EMPLOYEE)) + $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; + + $races = new CharRaceList($conditions); if (!$races->error) { $this->lvTabs[] = array( diff --git a/pages/skills.php b/pages/skills.php index 63e39e8a..0f3db606 100644 --- a/pages/skills.php +++ b/pages/skills.php @@ -29,8 +29,9 @@ class SkillsPage extends GenericPage protected function generateContent() { $conditions = []; + if (!User::isInGroup(U_GROUP_EMPLOYEE)) - $conditions[] = ['categoryId', 12, '!']; // GENERIC (DND) + $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; if ($this->category) $conditions[] = ['typeCat', $this->category[0]]; diff --git a/pages/spells.php b/pages/spells.php index bad65f47..84be74d0 100644 --- a/pages/spells.php +++ b/pages/spells.php @@ -239,7 +239,7 @@ class SpellsPage extends GenericPage array_push($visibleCols, 'level', 'singleclass', 'schools'); $conditions[] = ['s.typeCat', [7, -2]]; - $conditions[] = [['s.cuFlags', (SPELL_CU_TRIGGERED | SPELL_CU_TALENT | CUSTOM_EXCLUDE_FOR_LISTVIEW), '&'], 0]; + $conditions[] = [['s.cuFlags', (SPELL_CU_TRIGGERED | SPELL_CU_TALENT), '&'], 0]; // Runeforging listed multiple times, exclude from explicit skill-listing // if (isset($this->category[1]) && $this->category[1] == 6 && isset($this->category[2]) && $this->category[2] != 776) @@ -346,16 +346,14 @@ class SpellsPage extends GenericPage case 0: // misc. Spells array_push($visibleCols, 'level'); - $conditions[] = array( - 'OR', - ['s.typeCat', 0], - ['s.cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'] - ); - + $conditions[] = ['s.typeCat', 0]; break; } } + if (!User::isInGroup(U_GROUP_EMPLOYEE)) + $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; + if ($_ = $this->filterObj->getConditions()) $conditions[] = $_; diff --git a/pages/titles.php b/pages/titles.php index 617a8aed..37402ee0 100644 --- a/pages/titles.php +++ b/pages/titles.php @@ -30,7 +30,7 @@ class TitlesPage extends GenericPage { $conditions = []; - if (!User::isInGroup(U_GROUP_EMPLOYEE)) // hide unused titles + if (!User::isInGroup(U_GROUP_EMPLOYEE)) // hide unused titles $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; if ($this->category) diff --git a/setup/updates/09_internal_db_items.sql b/setup/updates/09_internal_db_items.sql new file mode 100644 index 00000000..4a6b53f7 --- /dev/null +++ b/setup/updates/09_internal_db_items.sql @@ -0,0 +1,18 @@ +UPDATE aowow_creature SET cuFlags = cuFlags | 0x40000000 WHERE + name_loc0 like '%(%' OR + name_loc0 like '%[%' OR + name_loc0 like '%<%' OR + name_loc0 like '%placeholder%' OR + name_loc0 like '%DND%' OR + name_loc0 like '%UNUSED%'; + +UPDATE aowow_currencies SET cuFlags = cuFlags | 0x40000000 WHERE + id IN (1, 2, 4, 22, 141); + +UPDATE aowow_skillline SET cuFlags = cuFlags | 0x40000000 WHERE + id IN (769, 142, 148, 149, 150, 152, 155, 533, 553, 554, 713, 183); + +UPDATE aowow_items SET cuFlags = cuFlags | 0x40000000 WHERE + name_loc0 like '%[%' OR + name_loc0 like '%(PH)%' OR + name_loc0 like '%(DEPRECATED)%';