- flagged more db-entries with CUSTOM_EXCLUDE_FOR_LISTVIEW

- check for this flag on list-pages (search already had this)
This commit is contained in:
Sarjuuk
2014-09-19 19:32:49 +02:00
parent 0620a0081d
commit 49ecdb9a31
14 changed files with 67 additions and 12 deletions

View File

@@ -55,6 +55,9 @@ class AchievementsPage extends GenericPage
{ {
$conditions = []; $conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
// include child categories if current category is empty // include child categories if current category is empty
if ($this->category) if ($this->category)
$conditions[] = ['category', (int)end($this->category)]; $conditions[] = ['category', (int)end($this->category)];

View File

@@ -29,6 +29,10 @@ class CurrenciesPage extends GenericPage
protected function generateContent() protected function generateContent()
{ {
$conditions = []; $conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if ($this->category) if ($this->category)
$conditions[] = ['category', (int)$this->category[0]]; $conditions[] = ['category', (int)$this->category[0]];

View File

@@ -30,6 +30,9 @@ class EventsPage extends GenericPage
{ {
$condition = []; $condition = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$condition[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if ($this->category) if ($this->category)
{ {
switch ($this->category[0]) switch ($this->category[0])

View File

@@ -96,6 +96,9 @@ class ItemsPage extends GenericPage
$conditions = []; $conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
/*******************/ /*******************/
/* evaluate filter */ /* evaluate filter */
/*******************/ /*******************/

View File

@@ -29,7 +29,15 @@ class ItemsetsPage extends GenericPage
protected function generateContent() 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()); $this->extendGlobalData($itemsets->getJSGlobals());
// recreate form selection // recreate form selection

View File

@@ -33,6 +33,9 @@ class NpcsPage extends GenericPage
{ {
$conditions = []; $conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if ($this->category) if ($this->category)
{ {
$conditions[] = ['type', $this->category[0]]; $conditions[] = ['type', $this->category[0]];

View File

@@ -33,6 +33,9 @@ class ObjectsPage extends GenericPage
{ {
$conditions = []; $conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if ($this->category) if ($this->category)
$conditions[] = ['typeCat', (int)$this->category[0]]; $conditions[] = ['typeCat', (int)$this->category[0]];

View File

@@ -29,6 +29,10 @@ class PetsPage extends GenericPage
protected function generateContent() protected function generateContent()
{ {
$conditions = []; $conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if ($this->category) if ($this->category)
$conditions[] = ['type', (int)$this->category[0]]; $conditions[] = ['type', (int)$this->category[0]];

View File

@@ -34,7 +34,9 @@ class QuestsPage extends GenericPage
{ {
$conditions = []; $conditions = [];
// cnd if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if (isset($this->category[1])) if (isset($this->category[1]))
$conditions[] = ['zoneOrSort', $this->category[1]]; $conditions[] = ['zoneOrSort', $this->category[1]];
else if (isset($this->category[0])) else if (isset($this->category[0]))

View File

@@ -25,7 +25,12 @@ class RacesPage extends GenericPage
protected function generateContent() 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) if (!$races->error)
{ {
$this->lvTabs[] = array( $this->lvTabs[] = array(

View File

@@ -29,8 +29,9 @@ class SkillsPage extends GenericPage
protected function generateContent() protected function generateContent()
{ {
$conditions = []; $conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE)) if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = ['categoryId', 12, '!']; // GENERIC (DND) $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if ($this->category) if ($this->category)
$conditions[] = ['typeCat', $this->category[0]]; $conditions[] = ['typeCat', $this->category[0]];

View File

@@ -239,7 +239,7 @@ class SpellsPage extends GenericPage
array_push($visibleCols, 'level', 'singleclass', 'schools'); array_push($visibleCols, 'level', 'singleclass', 'schools');
$conditions[] = ['s.typeCat', [7, -2]]; $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 // 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) // 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 case 0: // misc. Spells
array_push($visibleCols, 'level'); array_push($visibleCols, 'level');
$conditions[] = array( $conditions[] = ['s.typeCat', 0];
'OR',
['s.typeCat', 0],
['s.cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&']
);
break; break;
} }
} }
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if ($_ = $this->filterObj->getConditions()) if ($_ = $this->filterObj->getConditions())
$conditions[] = $_; $conditions[] = $_;

View File

@@ -30,7 +30,7 @@ class TitlesPage extends GenericPage
{ {
$conditions = []; $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]; $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
if ($this->category) if ($this->category)

View File

@@ -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)%';