Using consistent button labels
authorAlexander Ebert <ebert@woltlab.com>
Thu, 16 Jun 2016 09:47:00 +0000 (11:47 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 16 Jun 2016 09:47:06 +0000 (11:47 +0200)
wcfsetup/install/files/lib/acp/form/BBCodeAddForm.class.php
wcfsetup/install/files/lib/acp/form/BBCodeEditForm.class.php

index a31c2d9322aae82eee572170716b865f270c5ae9..64e480ce8bdd436d2885644116056a3a7ede40a3 100644 (file)
@@ -243,12 +243,12 @@ class BBCodeAddForm extends AbstractForm {
                
                if ($this->showButton && !I18nHandler::getInstance()->isPlainValue('buttonLabel')) {
                        $bbcodeID = $returnValues['returnValues']->bbcodeID;
-                       I18nHandler::getInstance()->save('buttonLabel', 'wcf.bbcode.buttonLabel'.$bbcodeID, 'wcf.bbcode', 1);
+                       I18nHandler::getInstance()->save('buttonLabel', 'wcf.editor.button.button'.$bbcodeID, 'wcf.editor', 1);
                        
                        // update button label
                        $bbcodeEditor = new BBCodeEditor($returnValues['returnValues']);
                        $bbcodeEditor->update([
-                               'buttonLabel' => 'wcf.bbcode.buttonLabel'.$bbcodeID
+                               'buttonLabel' => 'wcf.editor.button.button'.$bbcodeID
                        ]);
                }
                
index cf30c749b21a517f3c2fbe3b5ab4f423311613a7..df848a24b6928cf5674130468e9dd7d410e5ae0b 100644 (file)
@@ -79,13 +79,13 @@ class BBCodeEditForm extends BBCodeAddForm {
                AbstractForm::save();
                
                if ($this->showButton) {
-                       $this->buttonLabel = 'wcf.bbcode.buttonLabel'.$this->bbcode->bbcodeID;
+                       $this->buttonLabel = 'wcf.editor.button.button'.$this->bbcode->bbcodeID;
                        if (I18nHandler::getInstance()->isPlainValue('buttonLabel')) {
                                I18nHandler::getInstance()->remove($this->buttonLabel);
                                $this->buttonLabel = I18nHandler::getInstance()->getValue('buttonLabel');
                        }
                        else {
-                               I18nHandler::getInstance()->save('buttonLabel', $this->buttonLabel, 'wcf.bbcode', 1);
+                               I18nHandler::getInstance()->save('buttonLabel', $this->buttonLabel, 'wcf.editor', 1);
                        }
                }
                
@@ -136,7 +136,7 @@ class BBCodeEditForm extends BBCodeAddForm {
                parent::readData();
                
                if (empty($_POST)) {
-                       I18nHandler::getInstance()->setOptions('buttonLabel', 1, $this->bbcode->buttonLabel, 'wcf.bbcode.buttonLabel\d+');
+                       I18nHandler::getInstance()->setOptions('buttonLabel', 1, $this->bbcode->buttonLabel, 'wcf.editor.button.button\d+');
                        $this->buttonLabel = $this->bbcode->buttonLabel;
                        
                        $this->attributes = BBCodeAttribute::getAttributesByBBCode($this->bbcode);