From 4416bcf5555f9413649358b2ff32e3ab784c47d6 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 11 Mar 2008 20:10:39 +0000 Subject: [PATCH] Fix AJAX comment ops for single posts. Props mdawaffe. see #6165 git-svn-id: http://svn.automattic.com/wordpress/trunk@7247 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 43a391b85..77e9cdbd3 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -34,12 +34,13 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) { $title = __('Posts'); $parent_file = 'edit.php'; wp_enqueue_script('admin-forms'); -if ( 1 == $_GET['c'] ) - wp_enqueue_script( 'admin-comments' ); -require_once('admin-header.php'); list($post_stati, $avail_post_stati) = wp_edit_posts_query(); +if ( 1 == count($posts) && is_singular() ) + wp_enqueue_script( 'admin-comments' ); +require_once('admin-header.php'); + if ( !isset( $_GET['paged'] ) ) $_GET['paged'] = 1; @@ -139,7 +140,7 @@ if ( $page_links ) posts WHERE post_type = 'post' ORDER BY post_date DESC"; $arc_result = $wpdb->get_results( $arc_query ); @@ -195,7 +196,7 @@ if ( $page_links ) get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date"); if ( $comments ) :