Make WordPress Core

Ticket #6979: swfupload.2.2.0-beta2.diff

File swfupload.2.2.0-beta2.diff, 3.5 KB (added by filosofo, 16 years ago)

new patch for beta-2 of 2.2.0

  • wp-includes/js/swfupload/handlers.js

     
    205205        }
    206206}
    207207
     208function swfuploadPreLoad() {
     209        return true;
     210}
     211
     212function swfuploadLoadFailed() {
     213        return true;
     214}
     215
    208216function uploadError(fileObj, error_code, message) {
    209217        // first the file specific error
    210218        if ( error_code == SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL ) {
  • wp-includes/script-loader.php

     
    104104        $scripts->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.js', array('jquery'), '3.1-20080430');
    105105        $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2.0.2-20080430');
    106106        $scripts->add( 'swfupload-degrade', '/wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js', array('swfupload'), '2.0.2');
     107        $scripts->add( 'swfupload-swfobject', '/wp-includes/js/swfupload/plugins/swfupload.swfobject.js', array('swfupload'), '2.0.2');
    107108        $scripts->localize( 'swfupload-degrade', 'uploadDegradeOptions', array(
    108109                'is_lighttpd_before_150' => is_lighttpd_before_150(),
    109110        ) );
  • wp-admin/includes/media.php

     
    12201220<!--
    12211221jQuery(function($){
    12221222        swfu = new SWFUpload({
     1223                        button_text: '<span class="button"><?php _e('Upload'); ?></span>',
     1224                        button_text_style: '.button { text-align: center; font-weight: bold; font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif; }',
     1225                        button_height: "24",
     1226                        button_width: "132",
     1227                        button_image_url: '<?php echo includes_url('images/upload.png'); ?>',
     1228                        button_placeholder_id: "async-upload-wrap",
    12231229                        upload_url : "<?php echo attribute_escape( $flash_action_url ); ?>",
    1224                         flash_url : "<?php echo includes_url('js/swfupload/swfupload_f9.swf'); ?>",
     1230                        flash_url : "<?php echo includes_url('js/swfupload/swfupload.swf'); ?>",
    12251231                        file_post_name: "async-upload",
    12261232                        file_types: "<?php echo apply_filters('upload_file_glob', '*.*'); ?>",
    12271233                        post_params : {
     
    12441250                        upload_complete_handler : uploadComplete,
    12451251                        file_queue_error_handler : fileQueueError,
    12461252                        file_dialog_complete_handler : fileDialogComplete,
     1253                        swfupload_pre_load_handler: swfuploadPreLoad,
     1254                        swfupload_load_failed_handler: swfuploadLoadFailed,
    12471255
    12481256                        debug: false
    12491257                });
     
    12631271
    12641272<div id="html-upload-ui">
    12651273<?php do_action('pre-html-upload-ui'); ?>
    1266         <p>
     1274        <p id="async-upload-wrap">
    12671275        <input type="file" name="async-upload" id="async-upload" /> <input type="submit" class="button" name="html-upload" value="<?php echo attribute_escape(__('Upload')); ?>" /> <a href="#" onclick="return top.tb_remove();"><?php _e('Cancel'); ?></a>
    12681276        </p>
    12691277
  • wp-admin/media-upload.php

     
    1616        wp_die(__('You do not have permission to upload files.'));
    1717
    1818wp_enqueue_script('swfupload');
    19 wp_enqueue_script('swfupload-degrade');
     19wp_enqueue_script('swfupload-swfobject');
    2020wp_enqueue_script('swfupload-queue');
    2121wp_enqueue_script('swfupload-handlers');
    2222