Changeset 7247

Show
Ignore:
Timestamp:
03/11/08 20:10:39 (10 months ago)
Author:
ryan
Message:

Fix AJAX comment ops for single posts. Props mdawaffe. see #6165

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/edit.php

    r7184 r7247  
    3535$parent_file = 'edit.php'; 
    3636wp_enqueue_script('admin-forms'); 
    37 if ( 1 == $_GET['c'] ) 
     37 
     38list($post_stati, $avail_post_stati) = wp_edit_posts_query(); 
     39 
     40if ( 1 == count($posts) && is_singular() ) 
    3841    wp_enqueue_script( 'admin-comments' ); 
    3942require_once('admin-header.php'); 
    40  
    41 list($post_stati, $avail_post_stati) = wp_edit_posts_query(); 
    4243 
    4344if ( !isset( $_GET['paged'] ) ) 
     
    140141<?php wp_nonce_field('bulk-posts'); ?> 
    141142<?php 
    142 if ( !isset( $_GET['p'] ) ) { 
     143if ( !is_singular() ) { 
    143144$arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'post' ORDER BY post_date DESC"; 
    144145 
     
    196197<?php 
    197198 
    198 if ( 1 == count($posts) && isset( $_GET['p'] ) ) : 
     199if ( 1 == count($posts) && is_singular() ) : 
    199200 
    200201    $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");