}
// save page
- $page = PageEditor::create($data);
+ $page = new PageEditor(PageEditor::create($data));
if (!$page->identifier) {
// set generic page identifier
- $pageEditor = new PageEditor($page);
- $pageEditor->update([
+ $page->update([
'identifier' => 'com.woltlab.wcf.generic'.$page->pageID
]);
}
'customURL' => $contentData['customURL'],
'hasEmbeddedObjects' => $contentData['hasEmbeddedObjects']
]);
+
+ if ($page->pageType == 'tpl') {
+ $page->updateTemplate($languageID ?: null, $contentData['content']);
+ }
}
ImportHandler::getInstance()->saveNewID('com.woltlab.wcf.page', $oldID, $page->pageID);