diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/blog/languages/en.php | 2 | ||||
-rw-r--r-- | mod/blog/lib/blog.php | 2 | ||||
-rw-r--r-- | mod/blog/start.php | 12 | ||||
-rw-r--r-- | mod/blog/views/default/blog/group_module.php | 6 |
4 files changed, 10 insertions, 12 deletions
diff --git a/mod/blog/languages/en.php b/mod/blog/languages/en.php index d247c0150..8d0ee7c44 100644 --- a/mod/blog/languages/en.php +++ b/mod/blog/languages/en.php @@ -49,7 +49,7 @@ $english = array( 'blog:edit_revision_notice' => '(Old version)', 'blog:message:deleted_post' => 'Blog post deleted.', 'blog:error:cannot_delete_post' => 'Cannot delete blog post.', - 'blog:none' => 'No blogs found', + 'blog:none' => 'No blog posts', 'blog:error:missing:title' => 'Please enter a blog title!', 'blog:error:missing:description' => 'Please enter the body of your blog!', 'blog:error:cannot_edit_post' => 'This post may not exist or you may not have permissions to edit it.', diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 3a67af193..c79c863d3 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -256,7 +256,7 @@ function blog_get_page_content_archive($owner_guid, $lower = 0, $upper = 0) { } /** - * Get page components to edit a blog post. + * Get page components to edit/create a blog post. * * @param string $page 'edit' or 'new' * @param int $guid GUID of blog post or container diff --git a/mod/blog/start.php b/mod/blog/start.php index 1c0cc8b21..3a0fdc676 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -83,11 +83,10 @@ function blog_runonce() { * Friends' blog: pg/blog/friends/<username> * User's archives: pg/blog/archives/<username>/<time_start>/<time_stop> * Blog post: pg/blog/read/<guid>/<title> - * New post: pg/blog/new + * New post: pg/blog/new/<guid> * Edit post: pg/blog/edit/<guid>/<revision> * Preview post: pg/blog/preview/<guid> * Group blog: pg/blog/group/<guid>/owner - * Group new post: pg/blog/group/<guid>/new * * Title is ignored * @@ -143,19 +142,14 @@ function blog_page_handler($page) { break; case 'new': gatekeeper(); - $params = blog_get_page_content_edit($page_type); + $params = blog_get_page_content_edit($page_type, $page[1]); break; case 'edit': gatekeeper(); $params = blog_get_page_content_edit($page_type, $page[1], $page[2]); break; case 'group': - if ($page[2] == 'new') { - gatekeeper(); - $params = blog_get_page_content_edit($page_type, $page[1]); - } else { - $params = blog_get_page_content_list($page[1]); - } + $params = blog_get_page_content_list($page[1]); break; case 'all': default: diff --git a/mod/blog/views/default/blog/group_module.php b/mod/blog/views/default/blog/group_module.php index b2b98f1f5..57adff678 100644 --- a/mod/blog/views/default/blog/group_module.php +++ b/mod/blog/views/default/blog/group_module.php @@ -30,8 +30,12 @@ $options = array( $content = elgg_list_entities($options); elgg_pop_context(); +if (!$content) { + $content = '<p>' . elgg_echo('blog:none') . '</p>'; +} + $new_link = elgg_view('output/url', array( - 'href' => "pg/blog/group/$group->guid/new", + 'href' => "pg/blog/new/$group->guid", 'text' => elgg_echo('blog:write'), )); $content .= "<span class='elgg-widget-more'>$new_link</span>"; |