aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/actions/blog/save.php13
-rw-r--r--mod/blog/blog_lib.php2
-rw-r--r--mod/blog/languages/en.php2
-rw-r--r--mod/blog/start.php6
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
*/