diff options
Diffstat (limited to 'mod/blog')
-rw-r--r-- | mod/blog/lib/blog.php | 3 | ||||
-rw-r--r-- | mod/blog/start.php | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 94ab65da1..df307d70e 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -298,8 +298,7 @@ function blog_get_page_content_edit($page, $guid = 0, $revision = NULL) { elgg_push_breadcrumb($blog->title, $blog->getURL()); elgg_push_breadcrumb(elgg_echo('edit')); - $blog_js = elgg_get_simplecache_url('js', 'blog/save_draft'); - elgg_register_js('elgg.blog', $blog_js); + elgg_load_js('elgg.blog'); $content = elgg_view_form('blog/save', $vars, $body_vars); $sidebar = elgg_view('blog/sidebar/revisions', $vars); diff --git a/mod/blog/start.php b/mod/blog/start.php index 01d78b4dd..8ebb967cc 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -30,6 +30,10 @@ function blog_init() { // add to the main css elgg_extend_view('css/screen', 'blog/css'); + // register the blog's JavaScript + $blog_js = elgg_get_simplecache_url('js', 'blog/save_draft'); + elgg_register_js('elgg.blog', $blog_js); + // routing of urls elgg_register_page_handler('blog', 'blog_page_handler'); |