From 8ea5b7308486190f6a7f2f0208df66c715002292 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 30 Jan 2014 21:48:20 +0100 Subject: [PATCH] Fixed uninstall of templates --- .../TemplatePackageInstallationPlugin.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/package/plugin/TemplatePackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/TemplatePackageInstallationPlugin.class.php index eeb7564e4e..1d61429b58 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/TemplatePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/TemplatePackageInstallationPlugin.class.php @@ -55,9 +55,12 @@ class TemplatePackageInstallationPlugin extends AbstractPackageInstallationPlugi */ public function uninstall() { // fetch templates from log - $sql = "SELECT templateName, application - FROM wcf".WCF_N."_template - WHERE packageID = ?"; + $sql = "SELECT template.templateName, template.application, + template_group.templateGroupFolderName + FROM wcf".WCF_N."_template template + LEFT JOIN wcf".WCF_N."_template_group template_group + ON (template_group.templateGroupID = template.templateGroupID) + WHERE packageID = ?"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(array($this->installation->getPackageID())); @@ -67,7 +70,7 @@ class TemplatePackageInstallationPlugin extends AbstractPackageInstallationPlugi $templates[$row['application']] = array(); } - $templates[$row['application']][] = 'templates/'.$row['templateName'].'.tpl'; + $templates[$row['application']][] = 'templates/'.$row['templateGroupFolderName'].$row['templateName'].'.tpl'; } foreach ($templates as $application => $templateNames) { -- 2.20.1