mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
BaseTypes:
- rewrote BaseType::iterate() to be a generator and yield references (requires php 5.5) - reduced usage of bandaid BaseType::reset() - removed Util::getIdFieldName() which was even more of a bandaid - discovered DBSimple::selectPage() and consequently removed $matchQuery as they are now obsoloete Util: - added trainerTemplate lists for future use with trainers and trained spells misc. forgotten and/or broken stuff here and there
This commit is contained in:
@@ -8,13 +8,12 @@ class CharClassList extends BaseType
|
||||
public static $type = TYPE_CLASS;
|
||||
|
||||
protected $setupQuery = 'SELECT *, id AS ARRAY_KEY FROM ?_classes WHERE [cond] ORDER BY Id ASC';
|
||||
protected $matchQuery = 'SELECT COUNT(1) FROM ?_classes WHERE [cond]';
|
||||
|
||||
public function getListviewData()
|
||||
{
|
||||
$data = [];
|
||||
|
||||
while ($this->iterate())
|
||||
foreach ($this->iterate() as $__)
|
||||
{
|
||||
$data[$this->id] = array(
|
||||
'id' => $this->id,
|
||||
@@ -38,7 +37,7 @@ class CharClassList extends BaseType
|
||||
|
||||
public function addGlobalsToJscript(&$template, $addMask = 0)
|
||||
{
|
||||
while ($this->iterate())
|
||||
foreach ($this->iterate() as $__)
|
||||
$template->extendGlobalData(self::$type, [$this->id => ['name' => $this->getField('name', true)]]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user