Added support for button creation for BBCodes
authorAlexander Ebert <ebert@woltlab.com>
Tue, 25 Jun 2013 12:36:28 +0000 (14:36 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 25 Jun 2013 12:36:28 +0000 (14:36 +0200)
wcfsetup/install/files/lib/system/package/plugin/BBCodePackageInstallationPlugin.class.php

index 98d3f3b382f140956ebd6446848b5780219862c9..991a5759ea305c5fcac87b9e5707eabc705aebd3 100644 (file)
@@ -81,7 +81,7 @@ class BBCodePackageInstallationPlugin extends AbstractXMLPackageInstallationPlug
         * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::prepareImport()
         */
        protected function prepareImport(array $data) {
-               return array(
+               $data = array(
                        'bbcodeTag' => $data['attributes']['name'],
                        'htmlOpen' => (!empty($data['elements']['htmlopen']) ? $data['elements']['htmlopen'] : ''),
                        'htmlClose' => (!empty($data['elements']['htmlclose']) ? $data['elements']['htmlclose'] : ''),
@@ -90,7 +90,12 @@ class BBCodePackageInstallationPlugin extends AbstractXMLPackageInstallationPlug
                        'attributes' => (isset($data['elements']['attributes']) ? $data['elements']['attributes'] : array()),
                        'className' => (!empty($data['elements']['classname']) ? $data['elements']['classname'] : ''),
                        'isSourceCode' => (!empty($data['elements']['sourcecode']) ? 1 : 0),
+                       'buttonLabel' => (!empty($data['elements']['buttonlabel']) ? $data['elements']['buttonlabel'] : '')
                );
+               
+               if ($data['wysiwygIcon'] && $data['buttonLabel']) {
+                       $data['showButton'] = 1;
+               }
        }
        
        /**