aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-25 20:28:38 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-25 20:28:38 +0000
commitabcc9dc582242ccb32e68b0a2cfe84f79f3e5f5e (patch)
tree37a31861f556e9ad19c008c33b4fea29b4d66f35
parentbdc6ae790e1fad43e19957043e8745bb1aff839d (diff)
downloadelgg-abcc9dc582242ccb32e68b0a2cfe84f79f3e5f5e.tar.gz
elgg-abcc9dc582242ccb32e68b0a2cfe84f79f3e5f5e.tar.bz2
Fixed weird login in blog for real.
git-svn-id: http://code.elgg.org/elgg/trunk@5507 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/blog/blog_lib.php6
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(