From: Alexander Ebert Date: Sat, 3 May 2014 19:34:14 +0000 (+0200) Subject: Fix for templates in template groups during update X-Git-Tag: 2.0.7~45 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=596a76753fe5cb13b804143fe293cab037ce959a;p=GitHub%2FWoltLab%2FWCF.git Fix for templates in template groups during update --- 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 */