Adds missing template group cache reset
authorMatthias Schmidt <gravatronics@live.com>
Wed, 10 Jul 2013 16:41:59 +0000 (18:41 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 10 Jul 2013 16:41:59 +0000 (18:41 +0200)
… after creating a new template group during style import by creating the template group with `TermplateGroupAction` instead of `TemplateGroupEditor`

wcfsetup/install/files/lib/data/style/StyleEditor.class.php

index d8ae826e5d0d5a273a372dbde7cf9e74b7931055..0a9e0fdee6fdda7faf94bf1a9c4ee62aad632f91 100644 (file)
@@ -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