Fix for templates in template groups during update
authorAlexander Ebert <ebert@woltlab.com>
Sat, 3 May 2014 19:34:14 +0000 (21:34 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 3 May 2014 19:34:14 +0000 (21:34 +0200)
wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php
wcfsetup/install/files/lib/system/package/TemplatesFileHandler.class.php

index f2aadea149c0751dd886c2487131794a11510843..b8118da57a2dd7c8c74c84444b6f46c13c7dc838 100644 (file)
@@ -16,6 +16,12 @@ use wcf\system\WCF;
  * @category   Community Framework
  */
 class ACPTemplatesFileHandler extends PackageInstallationFileHandler {
+       /**
+        * template type supports template groups
+        * @var boolean
+        */
+       protected $supportsTemplateGroups = false;
+       
        /**
         * name of the database table where the installed files are logged
         * @var string
@@ -39,6 +45,9 @@ class ACPTemplatesFileHandler extends PackageInstallationFileHandler {
                                $conditions->add('packageID <> ?', array($this->packageInstallation->getPackageID()));
                                $conditions->add('templateName IN (?)', array($files));
                                $conditions->add('application = ?', array($this->application));
+                               if ($this->supportsTemplateGroups) {
+                                       $conditions->add("templateGroupID IS NULL");
+                               }
                                
                                $sql = "SELECT  packageID, templateName
                                        FROM    wcf".WCF_N."_".$this->tableName."
index 1e36def12d60a50a3e3631cbefa53e74d97a6bdc..6e84624bd0e942cbe91cbcce6f2f605875156974 100644 (file)
@@ -14,6 +14,11 @@ use wcf\system\WCF;
  * @category   Community Framework
  */
 class TemplatesFileHandler extends ACPTemplatesFileHandler {
+       /**
+        * @see \wcf\system\package\ACPTemplatesFileHandler::$supportsTemplateGroups
+        */
+       protected $supportsTemplateGroups = true;
+       
        /**
         * @see \wcf\system\package\ACPTemplatesFileHandler::$tableName
         */