Fix return value in Plupload when using the html4 runtime, fixes #19302
git-svn-id: http://svn.automattic.com/wordpress/trunk@19362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c65d96de08
commit
5866295242
|
@ -77,6 +77,9 @@ function updateMediaForm() {
|
|||
function uploadSuccess(fileObj, serverData) {
|
||||
var item = jQuery('#media-item-' + fileObj.id);
|
||||
|
||||
// on success serverData should be numeric, fix bug in html4 runtime returning the serverData wrapped in a <pre> tag
|
||||
serverData = serverData.replace(/^<pre>(\d+)<\/pre>$/, '$1');
|
||||
|
||||
// if async-upload returned an error message, place it in the media item div and return
|
||||
if ( serverData.match('media-upload-error') ) {
|
||||
item.html(serverData);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -222,7 +222,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
// cannot use the plupload.full.js, as it loads browserplus init JS from Yahoo
|
||||
$scripts->add( 'plupload-all', false, array('plupload', 'plupload-html5', 'plupload-flash', 'plupload-silverlight', 'plupload-html4'), '1511-20111112');
|
||||
|
||||
$scripts->add( 'plupload-handlers', "/wp-includes/js/plupload/handlers$suffix.js", array('plupload-all', 'jquery'), '20111118');
|
||||
$scripts->add( 'plupload-handlers', "/wp-includes/js/plupload/handlers$suffix.js", array('plupload-all', 'jquery'), '20111119');
|
||||
$scripts->localize( 'plupload-handlers', 'pluploadL10n', $uploader_l10n );
|
||||
|
||||
// keep 'swfupload' for back-compat.
|
||||
|
|
Loading…
Reference in New Issue