Make WordPress Core

Ticket #25663: 25663.3.diff

File 25663.3.diff, 2.2 KB (added by azaozz, 11 years ago)
  • src/wp-includes/js/plupload/handlers.js

     
    400400
    401401        // init and set the uploader
    402402        uploader_init = function() {
     403                var isIE = navigator.userAgent.indexOf('Trident/') != -1 || navigator.userAgent.indexOf('MSIE ') != -1;
     404
     405                 // Make sure flash sends cookies (seems in IE it does whitout switching to urlstream mode)
     406                 if ( ! isIE && 'flash' === plupload.predictRuntime( wpUploaderInit ) &&
     407                        ( ! wpUploaderInit.required_features || ! wpUploaderInit.required_features.hasOwnProperty( 'send_binary_string' ) ) ) {
     408
     409                        wpUploaderInit.required_features = wpUploaderInit.required_features || {};
     410                        wpUploaderInit.required_features.send_binary_string = true;
     411                }
     412
    403413                uploader = new plupload.Uploader(wpUploaderInit);
    404414
    405415                $('#image_resize').bind('change', function() {
     
    430440                                $('#drag-drop-area').unbind('.wp-uploader');
    431441                        }
    432442
    433                         if ( up.runtime == 'html4' )
     443                        if ( up.runtime === 'html4' ) {
    434444                                $('.upload-flash-bypass').hide();
     445                        }
    435446                });
    436447
    437448                uploader.init();
  • src/wp-includes/js/plupload/wp-plupload.js

     
    2525         */
    2626        Uploader = function( options ) {
    2727                var self = this,
     28                        isIE = navigator.userAgent.indexOf('Trident/') != -1 || navigator.userAgent.indexOf('MSIE ') != -1,
    2829                        elements = {
    2930                                container: 'container',
    3031                                browser:   'browse_button',
     
    8586                        return;
    8687                }
    8788
     89                 // Make sure flash sends cookies (seems in IE it does whitout switching to urlstream mode)
     90                 if ( ! isIE && 'flash' === plupload.predictRuntime( this.plupload ) &&
     91                        ( ! this.plupload.required_features || ! this.plupload.required_features.hasOwnProperty( 'send_binary_string' ) ) ) {
     92
     93                        this.plupload.required_features = this.plupload.required_features || {};
     94                        this.plupload.required_features.send_binary_string = true;
     95                }
     96
    8897                this.uploader = new plupload.Uploader( this.plupload );
    8998                delete this.plupload;
    9099