From: Tim Düsterhus Date: Wed, 11 Aug 2021 12:12:42 +0000 (+0200) Subject: Store deterministic language variable for style description in StyleEditForm X-Git-Tag: 5.4.5_RC_1~53^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bade41aeb7ff63541f8d8cc39c3e395a63b295d9;p=GitHub%2FWoltLab%2FWCF.git Store deterministic language variable for style description in StyleEditForm If the `styleDescription` was empty (as it might be for the default style) this attempted to store the description in the language item with empty name. --- diff --git a/wcfsetup/install/files/lib/acp/form/StyleEditForm.class.php b/wcfsetup/install/files/lib/acp/form/StyleEditForm.class.php index a117ce69be..40f1dcb3f5 100644 --- a/wcfsetup/install/files/lib/acp/form/StyleEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/StyleEditForm.class.php @@ -4,6 +4,7 @@ namespace wcf\acp\form; use wcf\data\style\Style; use wcf\data\style\StyleAction; +use wcf\data\style\StyleEditor; use wcf\form\AbstractForm; use wcf\system\exception\IllegalLinkException; use wcf\system\exception\UserInputException; @@ -346,7 +347,16 @@ class StyleEditForm extends StyleAddForm } // save description - I18nHandler::getInstance()->save('styleDescription', $this->style->styleDescription, 'wcf.style'); + I18nHandler::getInstance()->save( + 'styleDescription', + 'wcf.style.styleDescription' . $this->style->styleID, + 'wcf.style' + ); + + $styleEditor = new StyleEditor($this->style); + $styleEditor->update([ + 'styleDescription' => 'wcf.style.styleDescription' . $this->style->styleID, + ]); // call saved event $this->saved();