From 3f9d8a625f33374c5b99e917f125ba69429b37b1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 25 Jun 2013 14:36:28 +0200 Subject: [PATCH] Added support for button creation for BBCodes --- .../plugin/BBCodePackageInstallationPlugin.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/package/plugin/BBCodePackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/BBCodePackageInstallationPlugin.class.php index 98d3f3b382..991a5759ea 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/BBCodePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/BBCodePackageInstallationPlugin.class.php @@ -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; + } } /** -- 2.20.1