From 1a2c97886f7335509ed1e1f65aff4464a32e01eb Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 23 Feb 2013 08:49:08 -0500 Subject: Fixes #5012 drafts are private now --- mod/blog/lib/blog.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mod/blog/lib/blog.php') diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 3c71dfbab..8f15bd347 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -363,6 +363,10 @@ function blog_prepare_form_vars($post = NULL, $revision = NULL) { $values[$field] = $post->$field; } } + + if ($post->status == 'draft') { + $values['access_id'] = $post->future_access; + } } if (elgg_is_sticky_form('blog')) { -- cgit v1.2.3 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/blog/lib/blog.php') 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