Fixed uninstall of templates
authorMarcel Werk <burntime@woltlab.com>
Thu, 30 Jan 2014 20:48:20 +0000 (21:48 +0100)
committerMarcel Werk <burntime@woltlab.com>
Thu, 30 Jan 2014 20:48:20 +0000 (21:48 +0100)
wcfsetup/install/files/lib/system/package/plugin/TemplatePackageInstallationPlugin.class.php

index eeb7564e4e7072efad00bef12393218d3ff3bda2..1d61429b58fe120bc6af7d6078939bf7fe2924e9 100644 (file)
@@ -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) {