]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/upload.php
Wordpress 2.9.1
[autoinstalls/wordpress.git] / wp-admin / upload.php
index 2b891e1363294d299305b8a03fa0860d285d9b4a..8ddb013fa589daaa3e3b5faf15d513f561ad4408 100644 (file)
@@ -392,10 +392,12 @@ foreach ($arc_result as $arc_row) {
                if ( current_user_can('edit_post', $post->ID) )
                        $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>';
                if ( current_user_can('delete_post', $post->ID) )
-                       if ( EMPTY_TRASH_DAYS && MEDIA_TRASH )
+                       if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
                                $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>";
+                       } else {
+                               $delete_ays = !MEDIA_TRASH ? " onclick='return showNotice.warn();'" : '';
+                               $actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete 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>';