WordPress.org

Make WordPress Core

Ticket #13418: 13418.script-loader-max-upload-size.patch

File 13418.script-loader-max-upload-size.patch, 842 bytes (added by hakre, 4 years ago)
  • wp-includes/script-loader.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    191191        } 
    192192 
    193193        $scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20100523'); 
    194         $max_upload_size = ( (int) ( $max_up = @ini_get('upload_max_filesize') ) < (int) ( $max_post = @ini_get('post_max_size') ) ) ? $max_up : $max_post; 
     194        $max_upload_size = min( (int) @ini_get('upload_max_filesize'), (int) @ini_get('post_max_size') ); 
    195195        if ( empty($max_upload_size) ) 
    196196                $max_upload_size = __('not configured'); 
    197197        // these error messages came from the sample swfupload js, they might need changing.