From d149c0038d335133ed1628c105328b1e7a6681ea Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Tue, 5 Mar 2013 07:14:09 -0500 Subject: don't allow comments on draft blog posts --- mod/blog/lib/blog.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 8f15bd347..9753f27a8 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -39,8 +39,8 @@ function blog_get_page_content_read($guid = NULL) { elgg_push_breadcrumb($blog->title); $return['content'] = elgg_view_entity($blog, array('full_view' => true)); - //check to see if comment are on - if ($blog->comments_on != 'Off') { + // check to see if we should allow comments + if ($blog->comments_on != 'Off' && $blog->status == 'published') { $return['content'] .= elgg_view_comments($blog); } -- cgit v1.2.3