From bade41aeb7ff63541f8d8cc39c3e395a63b295d9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 11 Aug 2021 14:12:42 +0200 Subject: [PATCH] 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. --- .../files/lib/acp/form/StyleEditForm.class.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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(); -- 2.20.1