From: Matthias Schmidt Date: Sun, 2 Jun 2013 12:49:23 +0000 (+0200) Subject: Fixes button label for native BBCodes X-Git-Tag: 2.0.0_Beta_3~52 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=15ddbf708d2fe694804456bcbb93d81a1ac1cd97;p=GitHub%2FWoltLab%2FWCF.git Fixes button label for native BBCodes --- diff --git a/wcfsetup/install/files/lib/acp/form/BBCodeAddForm.class.php b/wcfsetup/install/files/lib/acp/form/BBCodeAddForm.class.php index c22883f59c..3492f14534 100644 --- a/wcfsetup/install/files/lib/acp/form/BBCodeAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/BBCodeAddForm.class.php @@ -133,6 +133,13 @@ class BBCodeAddForm extends AbstractForm { } I18nHandler::getInstance()->readValues(); + $this->readButtonLabelFormParameter(); + } + + /** + * Reads the form parameter for the button label. + */ + protected function readButtonLabelFormParameter() { if (I18nHandler::getInstance()->isPlainValue('buttonLabel')) $this->buttonLabel = I18nHandler::getInstance()->getValue('buttonLabel'); } diff --git a/wcfsetup/install/files/lib/acp/form/BBCodeEditForm.class.php b/wcfsetup/install/files/lib/acp/form/BBCodeEditForm.class.php index cddc35c06f..7925813f51 100644 --- a/wcfsetup/install/files/lib/acp/form/BBCodeEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/BBCodeEditForm.class.php @@ -53,7 +53,7 @@ class BBCodeEditForm extends BBCodeAddForm { * @see wcf\page\IPage::readParameters() */ public function readParameters() { - parent::readParameters(); + AbstractForm::readParameters(); if (isset($_REQUEST['id'])) $this->bbcodeID = intval($_REQUEST['id']); $this->bbcode = new BBCode($this->bbcodeID); @@ -62,6 +62,15 @@ class BBCodeEditForm extends BBCodeAddForm { } } + /** + * @see wcf\acp\form\BBCodeAddForm::readButtonLabelFormParameter() + */ + protected function readButtonLabelFormParameter() { + if (!in_array($this->bbcode->bbcodeTag, self::$nativeBBCodes)) { + parent::readButtonLabelFormParameter(); + } + } + /** * @see wcf\form\IForm::save() */