]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
don't allow comments on draft blog posts
authorCash Costello <cash.costello@gmail.com>
Tue, 5 Mar 2013 12:14:09 +0000 (07:14 -0500)
committerCash Costello <cash.costello@gmail.com>
Tue, 5 Mar 2013 12:14:09 +0000 (07:14 -0500)
mod/blog/lib/blog.php

index 8f15bd3475e13179ff6d22cd77e18cb6cf484e60..9753f27a8b658dc7a02c62537bdbf67bb790eb7b 100644 (file)
@@ -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);
        }