Fix saving page with parent via PIP
authorMatthias Schmidt <gravatronics@live.com>
Mon, 28 Jan 2019 17:30:37 +0000 (18:30 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 28 Jan 2019 17:30:37 +0000 (18:30 +0100)
See #2545

wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php

index 1aa393f4a6305b073a4a4210e66d92d8dd9eef41..6759cc4263da72bd485a3dddd9dce77e49659867 100644 (file)
@@ -748,6 +748,13 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                        }
                        
                        $data['content'] = $content;
+                       
+                       if (isset($data['parent'])) {
+                               $parent = $data['parent'];
+                               unset($data['parent']);
+                               
+                               $data['parentPageID'] = Page::getPageByIdentifier($parent)->pageID;
+                       }
                }
                
                return $data;