diff options
Diffstat (limited to 'mod/blog/blog_lib.php')
-rw-r--r-- | mod/blog/blog_lib.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mod/blog/blog_lib.php b/mod/blog/blog_lib.php index 2a52b7cd3..f363aa7b2 100644 --- a/mod/blog/blog_lib.php +++ b/mod/blog/blog_lib.php @@ -22,11 +22,11 @@ function blog_get_page_content_read($owner_guid = NULL, $guid = NULL) { if ($guid) { $blog = get_entity($guid); - if (elgg_instanceof($blog, 'object', 'blog') && $blog->status == 'final') { + if (!elgg_instanceof($blog, 'object', 'blog') || ($blog->status != 'final' && $blog->owner_guid != get_loggedin_userid())) { + $content .= elgg_echo('blog:error:post_not_found'); + } else { elgg_push_breadcrumb($blog->title, $blog->getURL()); $content .= elgg_view_entity($blog, TRUE); - } else { - $content .= elgg_echo('blog:error:post_not_found'); } } else { $options = array( |