From: Matthias Schmidt Date: Sat, 13 Oct 2018 13:06:28 +0000 (+0200) Subject: Use `tagName` when creating new PIP entry X-Git-Tag: 5.2.0_Alpha_1~646 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=92bcab67819b309ae5ee7921077098a2b880283a;p=GitHub%2FWoltLab%2FWCF.git Use `tagName` when creating new PIP entry See #2545 --- diff --git a/wcfsetup/install/files/lib/system/package/plugin/ACPSearchProviderPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ACPSearchProviderPackageInstallationPlugin.class.php index 5530eecbf1..181c86ade5 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ACPSearchProviderPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ACPSearchProviderPackageInstallationPlugin.class.php @@ -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'])); diff --git a/wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php index 2ea5623b0e..e4351397cb 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php @@ -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']); diff --git a/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php index f6f81e36cc..5baca1fec8 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php @@ -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'])) { diff --git a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php index 0e5c16ef86..0362ac6b96 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php @@ -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'])) { diff --git a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php index 855dec3707..4670abd149 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php @@ -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'; diff --git a/wcfsetup/install/files/lib/system/package/plugin/PIPPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/PIPPackageInstallationPlugin.class.php index f06623e5da..7202fe7ec6 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/PIPPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/PIPPackageInstallationPlugin.class.php @@ -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); diff --git a/wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php index 9a129f9738..393f400bbe 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php @@ -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'])); diff --git a/wcfsetup/install/files/lib/system/package/plugin/UserProfileMenuPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/UserProfileMenuPackageInstallationPlugin.class.php index 1b4d64fe2d..c6203cfa18 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/UserProfileMenuPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/UserProfileMenuPackageInstallationPlugin.class.php @@ -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']));