aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/start.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-23 19:25:14 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-23 19:25:14 +0000
commitb3e6ac6960e56001d80243f694fe2109211a5fce (patch)
treef8dfebc35a3fabda7a615b389b8758b88358f63b /mod/blog/start.php
parentc71f11c1b7a4a2ee634acd50582e5202da5389cc (diff)
downloadelgg-b3e6ac6960e56001d80243f694fe2109211a5fce.tar.gz
elgg-b3e6ac6960e56001d80243f694fe2109211a5fce.tar.bz2
Added an ElggBlog class to override the time_created field.
Added extra language files. git-svn-id: http://code.elgg.org/elgg/trunk@5486 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/start.php')
-rw-r--r--mod/blog/start.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php
index 0015efcf1..d0c4c5157 100644
--- a/mod/blog/start.php
+++ b/mod/blog/start.php
@@ -29,7 +29,10 @@ function blog_init() {
global $CONFIG;
require_once dirname(__FILE__) . '/blog_lib.php';
- add_menu(elgg_echo('blog'), "{$CONFIG->wwwroot}pg/blog/", array());
+ add_menu(elgg_echo('blog:blogs'), "{$CONFIG->wwwroot}pg/blog/", array());
+
+ // run the setup upon activations or to upgrade old installations.
+ run_function_once('blog_runonce', '1269370108');
elgg_extend_view('css', 'blog/css');
@@ -60,6 +63,15 @@ function blog_init() {
}
/**
+ * Register entity class for object:blog -> ElggBlog
+ */
+function blog_runonce() {
+ if (!update_subtype('object', 'blog', 'ElggBlog')) {
+ add_subtype('object', 'blog', 'ElggBlog');
+ }
+}
+
+/**
* Dispatches blog pages.
* To maintain URL backward compatibility, expects old-style URLs like:
* pg/blog/[username/[read|edit|archive|new/[time_start|guid/[time_end|title]]]]
@@ -176,7 +188,7 @@ function blog_page_setup() {
if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
if($page_owner->blog_enable != "no") {
$url = "{$CONFIG->wwwroot}pg/blog/{$page_owner->username}/items";
- add_submenu_item(elgg_echo("blog:groups:group_blogs"), $url);
+ add_submenu_item(elgg_echo('blog:groups:group_blogs'), $url);
}
}
}