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);