From f1cdd2b2ff935e23ed617cfaffe2cc9b31e0f0bb Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Thu, 10 Jun 2004 09:17:41 +0000 Subject: [PATCH] Needs to be inside of conditional. git-svn-id: https://develop.svn.wordpress.org/trunk@1402 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/template-functions-comment.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/wp-includes/template-functions-comment.php b/wp-includes/template-functions-comment.php index f111ddd581..d6c39b85c3 100644 --- a/wp-includes/template-functions-comment.php +++ b/wp-includes/template-functions-comment.php @@ -19,15 +19,14 @@ add_filter('comment_excerpt', 'convert_chars'); function comments_template() { global $withcomments, $single, $post, $wpdb, $id, $comment, $cookiehash; - $req = get_settings('require_name_email'); - $comment_author = isset($_COOKIE['comment_author_'.$cookiehash]) ? trim($_COOKIE['comment_author_'.$cookiehash]) : ''; - $comment_author_email = isset($_COOKIE['comment_author_email_'.$cookiehash]) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : ''; - $comment_author_url = isset($_COOKIE['comment_author_url_'.$cookiehash]) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : ''; - - $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date"); - - if ( $single || $withcomments ) + if ( $single || $withcomments ) : + $req = get_settings('require_name_email'); + $comment_author = isset($_COOKIE['comment_author_'.$cookiehash]) ? trim($_COOKIE['comment_author_'.$cookiehash]) : ''; + $comment_author_email = isset($_COOKIE['comment_author_email_'.$cookiehash]) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : ''; + $comment_author_url = isset($_COOKIE['comment_author_url_'.$cookiehash]) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : ''; + $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date"); include(ABSPATH . 'wp-comments.php'); + endif; } function clean_url($url) {