From 76899d182b1dff5f82c9f632d6ace3aaf99c085c Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 5 Jan 2014 22:18:36 +0100 Subject: [PATCH] Fixes languageCustomItemValue for "reseted" language items If you use a custom version of language item, but don't want to use it anymore and don't want the custom version to be saved, you uncheck the "Use custom value" checkbox and leave the "Custom Value" textarea empty. This is the same state as the state of a never edited language item which is why the `languageCustomItemValue` value of the previously customized language item has to be `NULL` as it is for the never edited language item. This fixes the number of custom phrases in the language table of LanguageListPage which currently counts all language items which ever had a custom value. --- .../files/lib/data/language/item/LanguageItemAction.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 793c5b839b..4ba38efe84 100644 --- a/wcfsetup/install/files/lib/data/language/item/LanguageItemAction.class.php +++ b/wcfsetup/install/files/lib/data/language/item/LanguageItemAction.class.php @@ -97,7 +97,7 @@ class LanguageItemAction extends AbstractDatabaseObjectAction { $editor = reset($this->objects); if ($editor->languageItemOriginIsSystem) { $updateData = array( - 'languageCustomItemValue' => $this->parameters['languageCustomItemValue'], + 'languageCustomItemValue' => !$this->parameters['languageUseCustomValue'] && empty($this->parameters['languageCustomItemValue']) ? null : $this->parameters['languageCustomItemValue'], 'languageUseCustomValue' => ($this->parameters['languageUseCustomValue'] ? 1 : 0) ); } -- 2.20.1