From 96d8355c66ad0280cd71eca4bc60f8121ff65ab3 Mon Sep 17 00:00:00 2001 From: Fabii547 Date: Sat, 14 Mar 2020 11:00:03 +0100 Subject: [PATCH] Use indented template group select list in `StyleAddForm` --- wcfsetup/install/files/acp/templates/styleAdd.tpl | 4 +--- wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php | 7 +------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/styleAdd.tpl b/wcfsetup/install/files/acp/templates/styleAdd.tpl index 1b240fe994..93b8f8b8ee 100644 --- a/wcfsetup/install/files/acp/templates/styleAdd.tpl +++ b/wcfsetup/install/files/acp/templates/styleAdd.tpl @@ -294,9 +294,7 @@
{if $errorField == 'templateGroupID'} diff --git a/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php b/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php index 0f8e20924b..15ffa0d049 100644 --- a/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php @@ -5,7 +5,6 @@ use wcf\data\style\Style; use wcf\data\style\StyleAction; use wcf\data\style\StyleEditor; use wcf\data\template\group\TemplateGroup; -use wcf\data\template\group\TemplateGroupList; use wcf\form\AbstractForm; use wcf\system\event\EventHandler; use wcf\system\exception\SystemException; @@ -213,11 +212,7 @@ class StyleAddForm extends AbstractForm { $this->readStyleVariables(); } - $templateGroupList = new TemplateGroupList(); - $templateGroupList->sqlOrderBy = "templateGroupName"; - $templateGroupList->getConditionBuilder()->add('templateGroupFolderName <> ?', ['_wcf_email/']); - $templateGroupList->readObjects(); - $this->availableTemplateGroups = $templateGroupList->getObjects(); + $this->availableTemplateGroups = TemplateGroup::getSelectList([-1], 1); if (isset($_REQUEST['tmpHash'])) { $this->tmpHash = StringUtil::trim($_REQUEST['tmpHash']); -- 2.20.1