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:
Sarjuuk
2013-08-18 13:40:12 +02:00
parent 0b0fa39ff4
commit 73cdce784e
34 changed files with 361 additions and 395 deletions

View File

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