diff --git a/wp-admin/edit-comments.js b/wp-admin/edit-comments.js index 193dd48c2..747ae42e3 100644 --- a/wp-admin/edit-comments.js +++ b/wp-admin/edit-comments.js @@ -3,3 +3,8 @@ addLoadEvent(function() {theList.dimComplete = function(what,id,dimClass) { if ( document.getElementById(what + '-' + id).className.match(dimClass) ) m.innerHTML = parseInt(m.innerHTML,10) + 1; else m.innerHTML = parseInt(m.innerHTML,10) - 1; }}); +addLoadEvent(function() {theList.dimComplete = function(what,id,dimClass) { + var m = document.getElementById('awaitmod'); + if ( document.getElementById(what + '-' + id).className.match(dimClass) ) m.innerHTML = parseInt(m.innerHTML,10) + 1; + else m.innerHTML = parseInt(m.innerHTML,10) - 1; +}}); diff --git a/wp-admin/inline-uploading.php b/wp-admin/inline-uploading.php index ceeb38d5e..bc21d5f4c 100644 --- a/wp-admin/inline-uploading.php +++ b/wp-admin/inline-uploading.php @@ -2,8 +2,6 @@ require_once('admin.php'); -check_admin_referer('inlineuploading'); - header('Content-Type: text/html; charset=' . get_option('blog_charset')); if (!current_user_can('upload_files')) @@ -36,16 +34,20 @@ break; case 'delete': +check_admin_referer('inlineuploading'); + if ( !current_user_can('edit_post', (int) $attachment) ) die(__('You are not allowed to delete this attachment.').' ".__('Go back').''); wp_delete_attachment($attachment); -header("Location: ". wp_nonce_url(basename(__FILE__)."?post=$post&all=$all&action=view&start=$start", 'inlineuploading')); +header("Location: " . basename(__FILE__) ."?post=$post&all=$all&action=view&start=$start"); die; case 'save': +check_admin_referer('inlineuploading'); + $overrides = array('action'=>'save'); $file = wp_handle_upload($_FILES['image'], $overrides); @@ -100,7 +102,7 @@ if ( preg_match('!^image/!', $attachment['post_mime_type']) ) { add_post_meta($id, '_wp_attachment_metadata', array()); } -header("Location: ". wp_nonce_url(basename(__FILE__)."?post=$post&all=$all&action=view&start=0", 'inlineuploading')); +header("Location: " . basename(__FILE__) . "?post=$post&all=$all&action=view&start=0"); die(); case 'upload': @@ -139,7 +141,7 @@ if ( '' == $sort ) $attachments = $wpdb->get_results("SELECT ID, post_date, post_title, post_mime_type, guid FROM $wpdb->posts WHERE post_type = 'attachment' $and_type $and_post $and_user ORDER BY $sort LIMIT $start, $double", ARRAY_A); if ( count($attachments) == 0 ) { - header("Location: ". wp_nonce_url(basename(__FILE__)."?post=$post&action=upload", 'inlineuploading') ); + header("Location: " . basename(__FILE__) ."?post=$post&action=upload" ); die; } elseif ( count($attachments) > $num ) { $next = $start + count($attachments) - $num; @@ -213,7 +215,7 @@ var icon = new Array(); "; $send_delete_cancel = "$__send_to_editor -$__delete +$__delete $__close "; $uwidth_sum += 128; @@ -641,25 +643,25 @@ th {