From 596a76753fe5cb13b804143fe293cab037ce959a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 3 May 2014 21:34:14 +0200 Subject: [PATCH] Fix for templates in template groups during update --- .../lib/system/package/ACPTemplatesFileHandler.class.php | 9 +++++++++ .../lib/system/package/TemplatesFileHandler.class.php | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php b/wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php index f2aadea149..b8118da57a 100644 --- a/wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php +++ b/wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php @@ -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." diff --git a/wcfsetup/install/files/lib/system/package/TemplatesFileHandler.class.php b/wcfsetup/install/files/lib/system/package/TemplatesFileHandler.class.php index 1e36def12d..6e84624bd0 100644 --- a/wcfsetup/install/files/lib/system/package/TemplatesFileHandler.class.php +++ b/wcfsetup/install/files/lib/system/package/TemplatesFileHandler.class.php @@ -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 */ -- 2.20.1