diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-04 22:51:37 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-04 22:51:37 +0000 |
commit | 8761800b92a6eb4bf3df361091cb85bb8459e959 (patch) | |
tree | 1c06aed6ce149e292dc1204699b99c6057cdf612 /mod | |
parent | 6a634b6ccd0fc8a7c629082e1213708b87f4adaf (diff) | |
download | elgg-8761800b92a6eb4bf3df361091cb85bb8459e959.tar.gz elgg-8761800b92a6eb4bf3df361091cb85bb8459e959.tar.bz2 |
Fixes #2519 we can now register and load php libraries - blog plugin is using this
git-svn-id: http://code.elgg.org/elgg/trunk@7532 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r-- | mod/blog/lib/blog.php (renamed from mod/blog/blog_lib.php) | 0 | ||||
-rw-r--r-- | mod/blog/start.php | 16 |
2 files changed, 8 insertions, 8 deletions
diff --git a/mod/blog/blog_lib.php b/mod/blog/lib/blog.php index 4db3effde..4db3effde 100644 --- a/mod/blog/blog_lib.php +++ b/mod/blog/lib/blog.php diff --git a/mod/blog/start.php b/mod/blog/start.php index 0d0c58ac8..9e3b8f300 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -14,14 +14,14 @@ * Notifications */ +elgg_register_event_handler('init', 'system', 'blog_init'); + /** * Init blog plugin. - * - * @return TRUE */ function blog_init() { - global $CONFIG; - require_once dirname(__FILE__) . '/blog_lib.php'; + + elgg_register_library('elgg:blog', elgg_get_plugin_path() . 'blog/lib/blog.php'); add_menu(elgg_echo('blog:blogs'), "pg/blog/", array()); @@ -47,8 +47,8 @@ function blog_init() { //add_widget_type('blog', elgg_echo('blog'), elgg_echo('blog:widget:description'), 'profile, dashboard'); - $action_path = dirname(__FILE__) . '/actions/blog'; - + // register actions + $action_path = elgg_get_plugin_path() . 'blog/actions/blog'; elgg_register_action('blog/save', "$action_path/save.php"); elgg_register_action('blog/auto_save_revision', "$action_path/auto_save_revision.php"); elgg_register_action('blog/delete', "$action_path/delete.php"); @@ -92,6 +92,8 @@ function blog_runonce() { function blog_page_handler($page) { global $CONFIG; + elgg_load_library('elgg:blog'); + // push breadcrumb elgg_push_breadcrumb(elgg_echo('blog:blogs'), "pg/blog"); @@ -201,5 +203,3 @@ function blog_profile_menu($hook, $entity_type, $return_value, $params) { return $return_value; } - -elgg_register_event_handler('init', 'system', 'blog_init'); |