From 7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 4 Apr 2008 16:44:15 +0000 Subject: Merged with WordPress 2.5, unstable, only for testing git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1218 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-comments-post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wp-comments-post.php') diff --git a/wp-comments-post.php b/wp-comments-post.php index 5637459..f7d7c4f 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -16,7 +16,7 @@ $status = $wpdb->get_row("SELECT post_status, comment_status FROM $wpdb->posts W if ( empty($status->comment_status) ) { do_action('comment_id_not_found', $comment_post_ID); exit; -} elseif ( 'closed' == $status->comment_status ) { +} elseif ( !comments_open($comment_post_ID) ) { do_action('comment_closed', $comment_post_ID); wp_die( __('Sorry, comments are closed for this item.') ); } elseif ( in_array($status->post_status, array('draft', 'pending') ) ) { -- cgit