From 8d712931b556e06d2f2eb8d8a0126819f4c7f9ee Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 10 Jul 2013 18:41:59 +0200 Subject: [PATCH] Adds missing template group cache reset MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … after creating a new template group during style import by creating the template group with `TermplateGroupAction` instead of `TemplateGroupEditor` --- .../files/lib/data/style/StyleEditor.class.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php index d8ae826e5d..0a9e0fdee6 100644 --- a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php @@ -3,7 +3,7 @@ namespace wcf\data\style; use wcf\data\language\LanguageList; use wcf\data\package\Package; use wcf\data\template\group\TemplateGroup; -use wcf\data\template\group\TemplateGroupEditor; +use wcf\data\template\group\TemplateGroupAction; use wcf\data\template\TemplateEditor; use wcf\data\DatabaseObjectEditor; use wcf\data\IEditableCachedObject; @@ -346,11 +346,14 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject $i++; } - $templateGroup = TemplateGroupEditor::create(array( - 'templateGroupName' => $templateGroupName, - 'templateGroupFolderName' => FileUtil::addTrailingSlash($templateGroupFolderName) + $templateGroupAction = new TemplateGroupAction(array(), 'create', array( + 'data' => array( + 'templateGroupName' => $templateGroupName, + 'templateGroupFolderName' => FileUtil::addTrailingSlash($templateGroupFolderName) + ) )); - $styleData['templateGroupID'] = $templateGroup->templateGroupID; + $returnValues = $templateGroupAction->executeAction(); + $styleData['templateGroupID'] = $returnValues['returnValues']->templateGroupID; } // import images -- 2.20.1