/** * @see Page::readData() */ public function readData() { ACPForm::readData(); $this->availableTemplatePacks = TemplatePack::getSelectList(array($this->templatePackID)); // default values if (!count($_POST)) { $this->templatePackName = $this->templatePack->templatePackName; $this->templatePackFolderName = $this->templatePack->templatePackFolderName; $this->parentTemplatePackID = $this->templatePack->parentTemplatePackID; } }
/** * Creates a select list. * * @param array<intger> $ignore * @return array */ public static function getSelectList($ignore = array()) { if (self::$templatePackStructure === null) { self::$templatePackStructure = array(); $sql = "SELECT\t\ttemplatePackID, templatePackName, parentTemplatePackID\n\t\t\t\tFROM\t\twcf" . WCF_N . "_template_pack\n\t\t\t\tORDER BY\ttemplatePackName"; $result = WCF::getDB()->sendQuery($sql); while ($row = WCF::getDB()->fetchArray($result)) { self::$templatePackStructure[$row['parentTemplatePackID']][] = new TemplatePack(null, $row); } } self::$selectList = array(); self::makeSelectList(0, 0, $ignore); return self::$selectList; }
/** * @see Page::readData() */ public function readData() { parent::readData(); $this->availableTemplatePacks = TemplatePack::getSelectList(); }