Fix editing single-language file with non-user interface language
authorMatthias Schmidt <gravatronics@live.com>
Sat, 12 Aug 2017 14:38:14 +0000 (16:38 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 12 Aug 2017 14:38:14 +0000 (16:38 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Media/Editor.js

index 7eb41a9058cf6696e35240ff00fdff34450d322f..6c504f0b8703c25db5c6a1f680cd078ab12b9d77 100644 (file)
@@ -277,9 +277,9 @@ define(
                                                                                        LanguageInput.setValues('title_' + this._media.mediaID, Dictionary.fromObject(this._media.title || { }));
                                                                                }
                                                                                else {
-                                                                                       title.value = this._media.title ? this._media.title[LANGUAGE_ID] : ''; 
-                                                                                       if (altText) altText.value = this._media.altText ? this._media.altText[LANGUAGE_ID] : '';
-                                                                                       if (caption) caption.value = this._media.caption ? this._media.caption[LANGUAGE_ID] : '';
+                                                                                       title.value = this._media.title ? this._media.title[this._media.languageID || LANGUAGE_ID] : ''; 
+                                                                                       if (altText) altText.value = this._media.altText ? this._media.altText[this._media.languageID || LANGUAGE_ID] : '';
+                                                                                       if (caption) caption.value = this._media.caption ? this._media.caption[this._media.languageID || LANGUAGE_ID] : '';
                                                                                }
                                                                                
                                                                                if (this._availableLanguageCount > 1) {