From: Alexander Ebert Date: Thu, 16 Mar 2017 13:05:33 +0000 (+0100) Subject: Clear old phrase when re-enabling custom value X-Git-Tag: 3.1.0_Alpha_1~565 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a4abcef245bc0582c0a3a445188ce1ba24a2d51a;p=GitHub%2FWoltLab%2FWCF.git Clear old phrase when re-enabling custom value See #2221 --- diff --git a/wcfsetup/install/files/lib/data/language/item/LanguageItemAction.class.php b/wcfsetup/install/files/lib/data/language/item/LanguageItemAction.class.php index 4dc6fcc112..11d9cd7849 100644 --- a/wcfsetup/install/files/lib/data/language/item/LanguageItemAction.class.php +++ b/wcfsetup/install/files/lib/data/language/item/LanguageItemAction.class.php @@ -102,6 +102,11 @@ class LanguageItemAction extends AbstractDatabaseObjectAction { 'languageCustomItemValue' => !$this->parameters['languageUseCustomValue'] && empty($this->parameters['languageCustomItemValue']) ? null : $this->parameters['languageCustomItemValue'], 'languageUseCustomValue' => $this->parameters['languageUseCustomValue'] ? 1 : 0 ]; + + if ($this->parameters['languageUseCustomValue']) { + $updateData['languageItemOldValue'] = null; + $updateData['languageCustomItemDisableTime'] = null; + } } else { $updateData = [