Silence error if TB iframe is loaded from another domain, see #6883
git-svn-id: http://svn.automattic.com/wordpress/trunk@12634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
04c6f96f3f
commit
633cdd43e9
|
@ -25,8 +25,11 @@ function fileQueued(fileObj) {
|
|||
}
|
||||
|
||||
function uploadStart(fileObj) {
|
||||
try {
|
||||
if ( typeof topWin.tb_remove != 'undefined' )
|
||||
topWin.jQuery('#TB_overlay').unbind('click', topWin.tb_remove);
|
||||
} catch(e){}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -46,8 +49,10 @@ function prepareMediaItem(fileObj, serverData) {
|
|||
jQuery('.bar', item).remove();
|
||||
jQuery('.progress', item).hide();
|
||||
|
||||
try {
|
||||
if ( typeof topWin.tb_remove != 'undefined' )
|
||||
topWin.jQuery('#TB_overlay').click(topWin.tb_remove);
|
||||
} catch(e){}
|
||||
|
||||
// Old style: Append the HTML returned by the server -- thumbnail and form inputs
|
||||
if ( isNaN(serverData) || !serverData ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -193,7 +193,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'swfupload-all', '/wp-includes/js/swfupload/swfupload-all.js', array(), '2201');
|
||||
}
|
||||
|
||||
$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20091227');
|
||||
$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20100106');
|
||||
$max_upload_size = ( (int) ( $max_up = @ini_get('upload_max_filesize') ) < (int) ( $max_post = @ini_get('post_max_size') ) ) ? $max_up : $max_post;
|
||||
if ( empty($max_upload_size) )
|
||||
$max_upload_size = __('not configured');
|
||||
|
|
Loading…
Reference in New Issue