From: Marcel Werk Date: Thu, 13 Mar 2014 18:26:10 +0000 (+0100) Subject: Improved update of language items X-Git-Tag: 2.0.4~12 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f2dd56599552374d97116ed5cd60bc518a20df9b;p=GitHub%2FWoltLab%2FWCF.git Improved update of language items --- 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);