- move sources from individual tables to a single table with searchable format

- implemented 'group by source' and most source-related filters in items.php
note: some fields are not yet set and searches against those will yield no usable result

- fixed js-error; always expecting array characters in g_user
- fixed rep gain on first login, when using external auth
- fixed wrong lootIds in ?_objects, where the field size was too small
This commit is contained in:
Sarjuuk
2014-09-02 23:35:20 +02:00
parent 5f09b7e5c5
commit 13e45827e4
20 changed files with 37622 additions and 198 deletions

View File

@@ -393,6 +393,22 @@ abstract class BaseType
}
}
/* source More .. keys seen used
'n': name [always set]
't': type [always set]
'ti': typeId [always set]
'bd': BossDrop [0; 1] [Creature / GO]
'dd': DungeonDifficulty [-2: DungeonHC; -1: DungeonNM; 1: Raid10NM; 2:Raid25NM; 3:Raid10HM; 4: Raid25HM] [Creature / GO]
'q': cssQuality [Items]
'z': zone [set when all happens in here]
'p': PvP [pvpSourceId]
's': TYPE_TITLE: side; TYPE_SPELL: skillId (yeah, double use. Ain't life just grand)
'c': category [Spells / Quests]
'c2': subCat [Quests]
'icon': iconString
*/
public function getSourceData() {}
// should return data required to display a listview of any kind
// this is a rudimentary example, that will not suffice for most Types
abstract public function getListviewData();
@@ -689,7 +705,10 @@ abstract class Filter
foreach (array_merge($this->fiData['c'], $this->fiData['v'], $override) as $k => $v)
{
if (isset($addCr[$k]))
{
$v = $v ? array_merge((array)$v, (array)$addCr[$k]) : $addCr[$k];
unset($addCr[$k]);
}
if (is_array($v) && !empty($v))
$_[$k] = $k.'='.implode(':', $v);
@@ -697,6 +716,14 @@ abstract class Filter
$_[$k] = $k.'='.$v;
}
// no criteria were set, so no merge occured .. append
if ($addCr)
{
$_['cr'] = 'cr='.$addCr['cr'];
$_['crs'] = 'crs='.$addCr['crs'];
$_['crv'] = 'crv='.$addCr['crv'];
}
return implode(';', $_);
}