From dd3dcbdca27cfb5e514e4b4b7b3772260ad2d01f Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 26 Mar 2019 23:18:58 +0100 Subject: [PATCH] Improved page importer --- .../files/lib/system/importer/PageImporter.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wcfsetup/install/files/lib/system/importer/PageImporter.class.php b/wcfsetup/install/files/lib/system/importer/PageImporter.class.php index 3504686946..d53e442e26 100644 --- a/wcfsetup/install/files/lib/system/importer/PageImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/PageImporter.class.php @@ -52,6 +52,9 @@ class PageImporter extends AbstractImporter { if (empty($data['packageID'])) { $data['packageID'] = 1; } + if (empty($data['applicationPackageID'])) { + $data['applicationPackageID'] = 1; + } // check old id if (is_numeric($oldID)) { @@ -61,6 +64,13 @@ class PageImporter extends AbstractImporter { // save page $page = PageEditor::create($data); + if (!$page->identifier) { + // set generic page identifier + $pageEditor = new PageEditor($page); + $pageEditor->update([ + 'identifier' => 'com.woltlab.wcf.generic'.$page->pageID + ]); + } // save page content foreach ($contents as $languageID => $contentData) { -- 2.20.1