WordPress.org

Make WordPress Core

Changeset 5667


Ignore:
Timestamp:
06/08/2007 06:56:34 AM (11 years ago)
Author:
ryan
Message:

More comment caching. see #4387

File:
1 edited

Legend:

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

    r5607 r5667  
    151151    $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
    152152    if ($comments) {
     153        update_comment_cache($comments);
    153154    ?>
    154155<h3 id="comments"><?php _e('Comments') ?></h3>
     
    159160
    160161        ++$i; $class = '';
    161         $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"));
     162        $post = get_post($comment->comment_post_ID);
     163        $authordata = get_userdata($post->post_author);
    162164            $comment_status = wp_get_comment_status($comment->comment_ID);
    163165            if ('unapproved' == $comment_status)
Note: See TracChangeset for help on using the changeset viewer.