aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/start.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
committerSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
commite53d410129701ea1c9d19529afa493f11b5f5b70 (patch)
treed9963b24bf8932654b4a47e36602c75975e50dba /mod/blog/start.php
parent377da25d2965c64941f83baae119fc970ec60982 (diff)
parent08a962c98e2923724f8013d6eaae89101243752a (diff)
downloadelgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.gz
elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.bz2
Merge github.com:Elgg/Elgg
Conflicts: engine/lib/input.php
Diffstat (limited to 'mod/blog/start.php')
-rw-r--r--mod/blog/start.php16
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;
}
/**