Fix PIP GUI-related bbcode issues
authorMatthias Schmidt <gravatronics@live.com>
Sat, 17 Nov 2018 08:50:34 +0000 (09:50 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 17 Nov 2018 08:50:34 +0000 (09:50 +0100)
See #2545

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

index 139d3e61b6c254e606dd2b2f6f341e9514cf0605..37e01027c64a2a38abdb0811b6f4e9212ea30976 100644 (file)
@@ -276,7 +276,7 @@ class BBCodePackageInstallationPlugin extends AbstractXMLPackageInstallationPlug
                $attributes = $element->getElementsByTagName('attributes')->item(0);
                if ($attributes !== null) {
                        $optionalAttributeElements = [
-                               $saveData ? 'html' : 'attributeHtml' => 'html',
+                               'html' => 'attributeHtml',
                                'required' => 'required',
                                'usetext' => $saveData ? 'usetext' : 'useText',
                                'validationpattern' => $saveData ? 'validationpattern' : 'validationPattern'
@@ -525,11 +525,11 @@ class BBCodePackageInstallationPlugin extends AbstractXMLPackageInstallationPlug
                        $bbcode,
                        [
                                'classname' => '',
-                               'htmlclose' => [
+                               'htmlopen' => [
                                        'cdata' => true,
                                        'defaultValue' => ''
                                ],
-                               'htmlopen' => [
+                               'htmlclose' => [
                                        'cdata' => true,
                                        'defaultValue' => ''
                                ],
@@ -549,9 +549,9 @@ class BBCodePackageInstallationPlugin extends AbstractXMLPackageInstallationPlug
                                $attribute = $document->createElement('attribute');
                                $attribute->setAttribute('name', (string) $attributeNumber);
                                
-                               if (!empty($attributeData['html'])) {
+                               if (!empty($attributeData['attributeHtml'])) {
                                        $html = $document->createElement('html');
-                                       $html->appendChild($document->createCDATASection($attributeData['html']));
+                                       $html->appendChild($document->createCDATASection($attributeData['attributeHtml']));
                                        $attribute->appendChild($html);
                                }
                                if (!empty($attributeData['validationPattern'])) {