Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 12288)
+++ wp-includes/comment.php	(working copy)
@@ -892,15 +892,11 @@
 
 	do_action('untrash_comment', $comment_id);
 
-	$comment = array('comment_ID' => $comment_id);
-
-	$status = get_comment_meta($comment_id, '_wp_trash_meta_status', true);
+	$status = (string) get_comment_meta($comment_id, '_wp_trash_meta_status', true);
 	if ( empty($status) )
 		$status = '0';
 
-	$comment['comment_approved'] = $status;
-
-	if ( wp_update_comment($comment) ) {
+	if ( wp_set_comment_status($comment_id, $status) ) {
 		delete_comment_meta($comment_id, '_wp_trash_meta_time');
 		delete_comment_meta($comment_id, '_wp_trash_meta_status');
 		do_action('untrashed_comment', $comment_id);
@@ -951,11 +947,11 @@
 
 	do_action('unspam_comment', $comment_id);
 
-	$status = get_comment_meta($comment_id, '_wp_trash_meta_status', true);
+	$status = (string) get_comment_meta($comment_id, '_wp_trash_meta_status', true);
 	if ( empty($status) )
 		$status = '0';
 
-	if ( wp_set_comment_status($comment_id, "$status") ) {
+	if ( wp_set_comment_status($comment_id, $status) ) {
 		delete_comment_meta($comment_id, '_wp_trash_meta_status');
 		do_action('unspammed_comment', $comment_id);
 		return true;
Index: wp-admin/edit-comments.php
===================================================================
--- wp-admin/edit-comments.php	(revision 12288)
+++ wp-admin/edit-comments.php	(working copy)
@@ -313,7 +313,7 @@
 <option value="unspam"><?php _e('Not Spam'); ?></option>
 <?php endif; ?>
 <?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?>
-<option value="delete"><?php _e('Delete Permanently'); ?></option>
+<option value="delete"><?php _e('Delete&nbsp;Permanently'); ?></option>
 <?php else: ?>
 <option value="trash"><?php _e('Move to Trash'); ?></option>
 <?php endif; ?>
@@ -409,7 +409,7 @@
 <option value="untrash"><?php _e('Restore'); ?></option>
 <?php endif; ?>
 <?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?>
-<option value="delete"><?php _e('Delete Permanently'); ?></option>
+<option value="delete"><?php _e('Delete&nbsp;Permanently'); ?></option>
 <?php elseif ( 'spam' == $comment_status ): ?>
 <option value="unspam"><?php _e('Not Spam'); ?></option>
 <?php else: ?>
Index: wp-admin/includes/dashboard.php
===================================================================
--- wp-admin/includes/dashboard.php	(revision 12288)
+++ wp-admin/includes/dashboard.php	(working copy)
@@ -555,7 +555,7 @@
 		$actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
 		$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */  _x( 'Spam', 'verb' ) . '</a>';
 		if ( !EMPTY_TRASH_DAYS )
-			$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>';
+			$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive'>" . __('Delete&nbsp;Permanently') . '</a>';
 		else
 			$actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . __( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';
 
Index: wp-admin/includes/meta-boxes.php
===================================================================
--- wp-admin/includes/meta-boxes.php	(revision 12288)
+++ wp-admin/includes/meta-boxes.php	(working copy)
@@ -187,7 +187,7 @@
 if ( ( 'edit' == $action ) && current_user_can("delete_${post_type}", $post->ID) ) {
 	if ( !EMPTY_TRASH_DAYS ) {
 		$delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID) ), "delete-${post_type}_{$post->ID}" );
-		$delete_text = __('Delete Permanently');
+		$delete_text = __('Delete&nbsp;Permanently');
 	} else {
 		$delete_url = wp_nonce_url( add_query_arg( array('action' => 'trash', 'post' => $post->ID) ), "trash-${post_type}_{$post->ID}" );
 		$delete_text = __('Move to Trash');
Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 12288)
+++ wp-admin/includes/template.php	(working copy)
@@ -1454,7 +1454,7 @@
 				elseif ( EMPTY_TRASH_DAYS )
 					$actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this post to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>";
 				if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS )
-					$actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this post permanently')) . "' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
+					$actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this post permanently')) . "' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete&nbsp;Permanently') . "</a>";
 			}
 			if ( in_array($post->post_status, array('pending', 'draft')) ) {
 				if ( current_user_can('edit_post', $post->ID) )
@@ -1674,7 +1674,7 @@
 			elseif ( EMPTY_TRASH_DAYS )
 				$actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this page to the Trash')) . "' href='" . get_delete_post_link($page->ID) . "'>" . __('Trash') . "</a>";
 			if ( $post->post_status == 'trash' || !EMPTY_TRASH_DAYS )
-				$actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-page_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>";
+				$actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-page_' . $page->ID) . "'>" . __('Delete&nbsp;Permanently') . "</a>";
 		}
 		if ( in_array($post->post_status, array('pending', 'draft')) ) {
 			if ( current_user_can('edit_page', $page->ID) )
@@ -2189,7 +2189,7 @@
 					}
 
 					if ( 'spam' == $the_comment_status || 'trash' == $the_comment_status || !EMPTY_TRASH_DAYS ) {
-						$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::delete=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>';
+						$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::delete=1 delete vim-d vim-destructive'>" . __('Delete&nbsp;Permanently') . '</a>';
 					} else {
 						$actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . __( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';
 					}
Index: wp-admin/includes/media.php
===================================================================
--- wp-admin/includes/media.php	(revision 12288)
+++ wp-admin/includes/media.php	(working copy)
@@ -1223,7 +1223,7 @@
 		$send = "<input type='submit' class='button' name='send[$attachment_id]' value='" . esc_attr__( 'Insert into Post' ) . "' />";
 	if ( $delete && current_user_can('delete_post', $attachment_id) ) {
 		if ( !EMPTY_TRASH_DAYS )
-			$delete = "<a href=\"" . wp_nonce_url("post.php?action=delete&amp;post=$attachment_id", 'delete-post_' . $attachment_id) . "\" id=\"del[$attachment_id]\" class=\"delete\">" . __('Delete Permanently') . "</a>";
+			$delete = "<a href=\"" . wp_nonce_url("post.php?action=delete&amp;post=$attachment_id", 'delete-post_' . $attachment_id) . "\" id=\"del[$attachment_id]\" class=\"delete\">" . __('Delete&nbsp;Permanently') . "</a>";
 		else
 			$delete = "<a href=\"" . wp_nonce_url("post.php?action=trash&amp;post=$attachment_id", 'trash-post_' . $attachment_id) . "\" id=\"del[$attachment_id]\" class=\"delete\">" . __('Move to Trash') . "</a> <a href=\"" . wp_nonce_url("post.php?action=untrash&amp;post=$attachment_id", 'untrash-post_' . $attachment_id) . "\" id=\"undo[$attachment_id]\" class=\"undo hidden\">" . __('Undo?') . "</a>";
 	} else {
Index: wp-admin/edit-attachment-rows.php
===================================================================
--- wp-admin/edit-attachment-rows.php	(revision 12288)
+++ wp-admin/edit-attachment-rows.php	(working copy)
@@ -97,7 +97,7 @@
 			elseif ( EMPTY_TRASH_DAYS )
 				$actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&amp;post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>";
 			if ( $is_trash || !EMPTY_TRASH_DAYS )
-				$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
+				$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete&nbsp;Permanently') . "</a>";
 		}
 		if ( !$is_trash )
 			$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
Index: wp-admin/upload.php
===================================================================
--- wp-admin/upload.php	(revision 12288)
+++ wp-admin/upload.php	(working copy)
@@ -206,7 +206,7 @@
 $messages[1] = __('Media attachment updated.');
 $messages[2] = __('Media permanently deleted.');
 $messages[3] = __('Error saving media attachment.');
-$messages[4] = __('Media moved to the trash.') . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.$_GET['ids'], "bulk-media" ) ) . '">' . __('Undo?') . '</a>';
+$messages[4] = __('Media moved to the trash.') . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __('Undo?') . '</a>';
 $messages[5] = __('Media restored from the trash.');
 
 if ( isset($_GET['message']) && (int) $_GET['message'] ) {
@@ -288,7 +288,7 @@
 <?php if ( $is_trash ) { ?>
 <option value="untrash"><?php _e('Restore'); ?></option>
 <?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
-<option value="delete"><?php _e('Delete Permanently'); ?></option>
+<option value="delete"><?php _e('Delete&nbsp;Permanently'); ?></option>
 <?php } else { ?>
 <option value="trash"><?php _e('Move to Trash'); ?></option>
 <?php } if ( isset($orphans) ) { ?>
@@ -394,7 +394,7 @@
 			if ( EMPTY_TRASH_DAYS )
 				$actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&amp;post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>";
 			else
-				$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
+				$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete&nbsp;Permanently') . "</a>";
 		$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
 		if ( current_user_can('edit_post', $post->ID) )
 			$actions['attach'] = '<a href="#the-list" onclick="findPosts.open(\'media[]\',\''.$post->ID.'\');return false;" class="hide-if-no-js">'.__('Attach').'</a>';
@@ -454,7 +454,7 @@
 <?php if ($is_trash) { ?>
 <option value="untrash"><?php _e('Restore'); ?></option>
 <?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
-<option value="delete"><?php _e('Delete Permanently'); ?></option>
+<option value="delete"><?php _e('Delete&nbsp;Permanently'); ?></option>
 <?php } else { ?>
 <option value="trash"><?php _e('Move to Trash'); ?></option>
 <?php } if (isset($orphans)) { ?>
Index: wp-admin/edit-form-comment.php
===================================================================
--- wp-admin/edit-form-comment.php	(revision 12288)
+++ wp-admin/edit-form-comment.php	(working copy)
@@ -68,7 +68,7 @@
 
 <div id="major-publishing-actions">
 <div id="delete-action">
-<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "</a>\n"; ?>
+<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete&nbsp;Permanently') : __('Move to Trash') ) . "</a>\n"; ?>
 </div>
 <div id="publishing-action">
 <input type="submit" name="save" value="<?php esc_attr_e('Update Comment'); ?>" tabindex="4" class="button-primary" />
Index: wp-admin/edit.php
===================================================================
--- wp-admin/edit.php	(revision 12288)
+++ wp-admin/edit.php	(working copy)
@@ -257,7 +257,7 @@
 <?php } else { ?>
 <option value="edit"><?php _e('Edit'); ?></option>
 <?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
-<option value="delete"><?php _e('Delete Permanently'); ?></option>
+<option value="delete"><?php _e('Delete&nbsp;Permanently'); ?></option>
 <?php } else { ?>
 <option value="trash"><?php _e('Move to Trash'); ?></option>
 <?php } ?>
@@ -347,7 +347,7 @@
 <?php } else { ?>
 <option value="edit"><?php _e('Edit'); ?></option>
 <?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
-<option value="delete"><?php _e('Delete Permanently'); ?></option>
+<option value="delete"><?php _e('Delete&nbsp;Permanently'); ?></option>
 <?php } else { ?>
 <option value="trash"><?php _e('Move to Trash'); ?></option>
 <?php } ?>
Index: wp-admin/edit-pages.php
===================================================================
--- wp-admin/edit-pages.php	(revision 12288)
+++ wp-admin/edit-pages.php	(working copy)
@@ -261,7 +261,7 @@
 <?php } else { ?>
 <option value="edit"><?php _e('Edit'); ?></option>
 <?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
-<option value="delete"><?php _e('Delete Permanently'); ?></option>
+<option value="delete"><?php _e('Delete&nbsp;Permanently'); ?></option>
 <?php } else { ?>
 <option value="trash"><?php _e('Move to Trash'); ?></option>
 <?php } ?>
@@ -310,7 +310,7 @@
 <?php } else { ?>
 <option value="edit"><?php _e('Edit'); ?></option>
 <?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
-<option value="delete"><?php _e('Delete Permanently'); ?></option>
+<option value="delete"><?php _e('Delete&nbsp;Permanently'); ?></option>
 <?php } else { ?>
 <option value="trash"><?php _e('Move to Trash'); ?></option>
 <?php } ?>
