From f2dd56599552374d97116ed5cd60bc518a20df9b Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 13 Mar 2014 19:26:10 +0100 Subject: [PATCH] Improved update of language items --- .../files/lib/data/language/LanguageEditor.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php index 06163c080e..dc133dc22f 100644 --- a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php +++ b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php @@ -235,9 +235,9 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje if ($updateExistingItems) { $sql .= " ON DUPLICATE KEY - UPDATE languageItemValue = IF(languageItemOriginIsSystem = 0, languageItemValue, VALUES(languageItemValue)), - languageCategoryID = VALUES(languageCategoryID), - languageUseCustomValue = 0"; + UPDATE languageUseCustomValue = IF(languageItemValue = VALUES(languageItemValue), languageUseCustomValue, 0), + languageItemValue = IF(languageItemOriginIsSystem = 0, languageItemValue, VALUES(languageItemValue)), + languageCategoryID = VALUES(languageCategoryID)"; } $statement = WCF::getDB()->prepareStatement($sql); -- 2.20.1