diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-25 21:42:24 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-25 21:42:24 +0000 |
commit | e66c96a5709b8b2f9c8b8348ba684bf775ae1405 (patch) | |
tree | 8f4ad7d5e648440eed00c838f8d3d7ad38fa7aee | |
parent | a93e7ca6eebfbedef5b311eac53854d785e5c82b (diff) | |
download | elgg-e66c96a5709b8b2f9c8b8348ba684bf775ae1405.tar.gz elgg-e66c96a5709b8b2f9c8b8348ba684bf775ae1405.tar.bz2 |
Added river support to blog.
git-svn-id: http://code.elgg.org/elgg/trunk@5510 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | mod/blog/actions/blog/save.php | 13 | ||||
-rw-r--r-- | mod/blog/blog_lib.php | 2 | ||||
-rw-r--r-- | mod/blog/languages/en.php | 2 | ||||
-rw-r--r-- | mod/blog/start.php | 6 |
4 files changed, 9 insertions, 14 deletions
diff --git a/mod/blog/actions/blog/save.php b/mod/blog/actions/blog/save.php index eca711f60..7115acaa4 100644 --- a/mod/blog/actions/blog/save.php +++ b/mod/blog/actions/blog/save.php @@ -144,6 +144,10 @@ if (!$error) { } system_message(elgg_echo('blog:message:saved')); + // @todo do we want to alert on updates? + if ($new_post) { + add_to_river('river/object/blog/create', 'create', get_loggedin_userid(), $blog->getGUID()); + } forward($success_forward_url); } else { register_error(elgg_echo('blog:error:cannot_save')); @@ -152,13 +156,4 @@ if (!$error) { } else { register_error($error); forward($error_forward_url); -} - -// forward with success or failure -if ($error) { - register_error($error); - forward($error_forward_url); -} else { - system_message(elgg_echo('blog:message:saved')); - forward($success_forward_url); }
\ No newline at end of file diff --git a/mod/blog/blog_lib.php b/mod/blog/blog_lib.php index f363aa7b2..f3e853ad7 100644 --- a/mod/blog/blog_lib.php +++ b/mod/blog/blog_lib.php @@ -22,7 +22,7 @@ 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' && $blog->owner_guid != get_loggedin_userid())) { + if (!elgg_instanceof($blog, 'object', 'blog') || ($blog->status != 'final' && !$blog->canEdit())) { $content .= elgg_echo('blog:error:post_not_found'); } else { elgg_push_breadcrumb($blog->title, $blog->getURL()); diff --git a/mod/blog/languages/en.php b/mod/blog/languages/en.php index f98cc6059..d1fc5528a 100644 --- a/mod/blog/languages/en.php +++ b/mod/blog/languages/en.php @@ -43,6 +43,8 @@ $english = array( 'blog:messages:warning:draft' => 'There is an unsaved draft of this post!', 'blog:edit_revision_notice' => '(Old version)', + // river + 'blog:river:create' => '%s made a new blog post.', ); diff --git a/mod/blog/start.php b/mod/blog/start.php index 3c497088a..619378af2 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -9,13 +9,11 @@ * @link http://elgg.org/ * * @todo - * Show your blog posts + * Either drop support for "publish date" or duplicate more entity getter + * functions to work with a non-standard time_created. * Show friends blog posts * Widget * - * Group blogs - * Forward to container instead of owner - * * Pingbacks * Notifications */ |