diff options
Diffstat (limited to 'mod/blog/start.php')
-rw-r--r-- | mod/blog/start.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php index 2d8f75ed2..fa57e7b96 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -32,6 +32,7 @@ function blog_init() { // register the blog's JavaScript $blog_js = elgg_get_simplecache_url('js', 'blog/save_draft'); + elgg_register_simplecache_view('js/blog/save_draft'); elgg_register_js('elgg.blog', $blog_js); // routing of urls @@ -92,14 +93,14 @@ function blog_init() { * @todo no archives for all blogs or friends * * @param array $page - * @return NULL + * @return bool */ function blog_page_handler($page) { elgg_load_library('elgg:blog'); // @todo remove the forwarder in 1.9 - // forward to correct URL for bookmarks pre-1.7.5 + // forward to correct URL for blog pages pre-1.7.5 blog_url_forwarder($page); // push all blogs breadcrumb @@ -138,17 +139,22 @@ function blog_page_handler($page) { $params = blog_get_page_content_list($page[1]); break; case 'all': - default: - $title = elgg_echo('blog:title:all_blogs'); $params = blog_get_page_content_list(); break; + default: + return false; } - $params['sidebar'] .= elgg_view('blog/sidebar', array('page' => $page_type)); + if (isset($params['sidebar'])) { + $params['sidebar'] .= elgg_view('blog/sidebar', array('page' => $page_type)); + } else { + $params['sidebar'] = elgg_view('blog/sidebar', array('page' => $page_type)); + } $body = elgg_view_layout('content', $params); echo elgg_view_page($params['title'], $body); + return true; } /** |