Use `tagName` when creating new PIP entry
authorMatthias Schmidt <gravatronics@live.com>
Sat, 13 Oct 2018 13:06:28 +0000 (15:06 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 13 Oct 2018 13:06:28 +0000 (15:06 +0200)
See #2545

wcfsetup/install/files/lib/system/package/plugin/ACPSearchProviderPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/PIPPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/UserProfileMenuPackageInstallationPlugin.class.php

index 5530eecbf133e0a33cd54d609729c1030747bf6a..181c86ade5f774dee9fcc12c3b83d3495f63776e 100644 (file)
@@ -236,7 +236,7 @@ class ACPSearchProviderPackageInstallationPlugin extends AbstractXMLPackageInsta
        protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
                $data = $form->getData()['data'];
                
-               $acpSearchProvider = $document->createElement('acpsearchprovider');
+               $acpSearchProvider = $document->createElement($this->tagName);
                $acpSearchProvider->setAttribute('name', $data['name']);
                $acpSearchProvider->appendChild($document->createElement('classname', $data['classname']));
                
index 2ea5623b0ea9e562debb88af63f01f77872312ca..e4351397cb8b6b79cb885418a97e021f34c955ff 100644 (file)
@@ -357,7 +357,7 @@ class CronjobPackageInstallationPlugin extends AbstractXMLPackageInstallationPlu
                $data = $form->getData();
                $formData = $form->getData()['data'];
                
-               $cronjob = $document->createElement('cronjob');
+               $cronjob = $document->createElement($this->tagName);
                $cronjob->setAttribute('name', $formData['name']);
                
                $className = $document->createElement('classname', $formData['classname']);
index f6f81e36cc64edcc4a168d2f99a9ace532fb349d..5baca1fec83a965a2e7e7a8fe0695de18ddb5809 100644 (file)
@@ -551,7 +551,7 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl
                $formData = $form->getData();
                $data = $formData['data'];
                
-               $menuItem = $document->createElement('item');
+               $menuItem = $document->createElement($this->tagName);
                $menuItem->setAttribute('identifier', $data['identifier']);
                
                if (!empty($data['menu'])) {
index 0e5c16ef86b7e8211dde8a7ab833bb4a065d22a4..0362ac6b9677eece82ed6ee8b204cb8731ba01ca 100644 (file)
@@ -228,7 +228,7 @@ class ObjectTypeDefinitionPackageInstallationPlugin extends AbstractXMLPackageIn
        protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
                $data = $form->getData()['data'];
                
-               $definition = $document->createElement('definition');
+               $definition = $document->createElement($this->tagName);
                $definition->appendChild($document->createElement('name', $data['name']));
                
                if (!empty($data['interfacename'])) {
index 855dec3707f05f10784971317f7bc89063a2b382..4670abd149e47a098b866276d17396ea945cd530 100644 (file)
@@ -727,7 +727,7 @@ XML;
         * @since       3.2
         */
        protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
-               $type = $document->createElement('type');
+               $type = $document->createElement($this->tagName);
                foreach ($form->getData()['data'] as $key => $value) {
                        if ($key === 'definitionID') {
                                $key = 'definitionname';
index f06623e5da2acb211e226b4793bfcbaaf16a9e1b..7202fe7ec6014cfb0dd1c38372b7c6c3c98b68d3 100644 (file)
@@ -203,7 +203,7 @@ class PIPPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                /** @var TextFormField $pluginName */
                $pluginName = $form->getNodeById('pluginName');
                
-               $pip = $document->createElement('pip', $className->getSaveValue());
+               $pip = $document->createElement($this->tagName, $className->getSaveValue());
                $pip->setAttribute('name', $pluginName->getSaveValue());
                
                $document->getElementsByTagName('import')->item(0)->appendChild($pip);
index 9a129f973872e912d9ca7da683460a7e1266dc28..393f400bbeca1361804c0f66d6e1dcb339e3d486 100644 (file)
@@ -772,7 +772,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                $formData = $form->getData();
                $data = $formData['data'];
                
-               $page = $document->createElement('page');
+               $page = $document->createElement($this->tagName);
                $page->setAttribute('identifier', $data['identifier']);
                
                $page->appendChild($document->createElement('pageType', $data['pageType']));
index 1b4d64fe2de2cea790c56e8d5a13ce886abd649c..c6203cfa188214bef9586f1cbc36d4ef05846377 100644 (file)
@@ -251,7 +251,7 @@ class UserProfileMenuPackageInstallationPlugin extends AbstractXMLPackageInstall
        protected function writeEntry(\DOMDocument $document, IFormDocument $form) {
                $data = $form->getData()['data'];
                
-               $userProfileMenuItem = $document->createElement('userprofilemenuitem');
+               $userProfileMenuItem = $document->createElement($this->tagName);
                $userProfileMenuItem->setAttribute('name', $data['name']);
                $userProfileMenuItem->appendChild($document->createElement('classname', $data['classname']));