Unecessary queries.

git-svn-id: http://svn.automattic.com/wordpress/trunk@169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-06-04 21:11:15 +00:00
parent 1d67fa97e6
commit f232508e3d
1 changed files with 2 additions and 4 deletions

View File

@ -8,15 +8,13 @@
$comment_author_url = (empty($HTTP_COOKIE_VARS["comment_author"])) ? "url" : trim($HTTP_COOKIE_VARS["comment_author_url"]);
$comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id ORDER BY comment_date");
$commentstatus = $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = $id");
$pingstatus = $wpdb->get_var("SELECT ping_status FROM $tableposts WHERE ID = $id");
?>
<!-- you can start editing here -->
<h2>Comments</h2>
<?php if ('open' == $pingstatus) { ?>
<?php if ('open' == $post->ping_status) { ?>
<p>The URL to TrackBack this entry is:</p>
<p><em><?php trackback_url() ?></em></p>
<?php } ?>
@ -40,7 +38,7 @@ if ($comments) {
<?php } ?>
</ol>
<h2>Leave a Comment</h2>
<?php if ('open' == $commentstatus) { ?>
<?php if ('open' == $post->comment_status) { ?>
<p>Line and paragraph breaks automatic, website trumps email, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <?php echo htmlentities($comment_allowed_tags); ?></p>