From: Matthias Schmidt Date: Sat, 21 Jul 2018 09:11:03 +0000 (+0200) Subject: Fix fetching templates for template listener PIP GUI X-Git-Tag: 5.2.0_Alpha_1~688 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=97fb76812281a7874507e607ed8986a0f79cbcb4;p=GitHub%2FWoltLab%2FWCF.git Fix fetching templates for template listener PIP GUI See #2545 --- diff --git a/wcfsetup/install/files/lib/system/package/plugin/TemplateListenerPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/TemplateListenerPackageInstallationPlugin.class.php index f5f2a8b99c..a34bc23743 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/TemplateListenerPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/TemplateListenerPackageInstallationPlugin.class.php @@ -161,7 +161,10 @@ class TemplateListenerPackageInstallationPlugin extends AbstractXMLPackageInstal $templateList = new TemplateList(); $templateList->getConditionBuilder()->add( 'template.packageID IN (?)', - [array_keys($this->installation->getPackage()->getAllRequiredPackages())] + [array_merge( + [$this->installation->getPackage()->packageID], + array_keys($this->installation->getPackage()->getAllRequiredPackages()) + )] ); $templateList->getConditionBuilder()->add('template.templateGroupID IS NULL'); $templateList->sqlOrderBy = 'template.templateName ASC'; @@ -172,7 +175,10 @@ class TemplateListenerPackageInstallationPlugin extends AbstractXMLPackageInstal $acpTemplateList = new ACPTemplateList(); $acpTemplateList->getConditionBuilder()->add( 'acp_template.packageID IN (?)', - [array_keys($this->installation->getPackage()->getAllRequiredPackages())] + [array_merge( + [$this->installation->getPackage()->packageID], + array_keys($this->installation->getPackage()->getAllRequiredPackages()) + )] ); $acpTemplateList->sqlOrderBy = 'acp_template.templateName ASC'; $acpTemplateList->readObjects();