Merge branch '3.0'
authorMatthias Schmidt <gravatronics@live.com>
Mon, 14 Aug 2017 15:14:28 +0000 (17:14 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 14 Aug 2017 15:14:28 +0000 (17:14 +0200)
1  2 
wcfsetup/install/files/js/WCF.js
wcfsetup/install/files/js/WoltLabSuite/Core/Media/Editor.js
wcfsetup/install/files/lib/data/user/UserProfileAction.class.php

Simple merge
index af05980ca992ba7b8a7a1ee1dcf348c485d91e13,6c504f0b8703c25db5c6a1f680cd078ab12b9d77..ad3912122369b0ea5a120c989334bf7b4301969e
@@@ -127,21 -109,9 +127,21 @@@ define
                        var captionError = (caption ? DomTraverse.childByClass(caption.parentNode.parentNode, 'innerError') : false);
                        var titleError = DomTraverse.childByClass(title.parentNode.parentNode, 'innerError');
                        
 +                      // category
 +                      this._oldCategoryId = this._media.categoryID;
 +                      if (this._categoryIds.length) {
 +                              this._media.categoryID = ~~categoryId.value;
 +                              
 +                              // if the selected category id not valid (manipulated DOM), ignore
 +                              if (this._categoryIds.indexOf(this._media.categoryID) === -1) {
 +                                      this._media.categoryID = 0;
 +                              }
 +                      }
 +                      
 +                      // language and multilingualism
                        if (this._availableLanguageCount > 1) {
                                this._media.isMultilingual = ~~elBySel('input[name=isMultilingual]', content).checked;
-                               this._media.languageID = this._media.isMultilingual ? null : LanguageChooser.getLanguageId('languageID');
+                               this._media.languageID = this._media.isMultilingual ? null : LanguageChooser.getLanguageId('mediaEditor_' + this._media.mediaID + '_languageID');
                        }
                        else {
                                this._media.languageID = LANGUAGE_ID;
                                                                        // make sure that the language chooser is initialized first
                                                                        setTimeout(function() {
                                                                                if (this._availableLanguageCount > 1) {
-                                                                                       LanguageChooser.setLanguageId('languageID', this._media.languageID || LANGUAGE_ID);
+                                                                                       LanguageChooser.setLanguageId('mediaEditor_' + this._media.mediaID + '_languageID', this._media.languageID || LANGUAGE_ID);
                                                                                }
                                                                                
 +                                                                              if (this._categoryIds.length) {
 +                                                                                      elBySel('select[name=categoryID]', content).value = ~~this._media.categoryID;
 +                                                                              }
 +                                                                              
                                                                                var title = elBySel('input[name=title]', content);
                                                                                var altText = elBySel('input[name=altText]', content);
                                                                                var caption = elBySel('textarea[name=caption]', content);