- 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 = [];
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)];

View File

@@ -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]];

View File

@@ -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])

View File

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

View File

@@ -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

View File

@@ -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]];

View File

@@ -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]];

View File

@@ -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]];

View File

@@ -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]))

View File

@@ -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(

View File

@@ -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]];

View File

@@ -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[] = $_;

View File

@@ -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)