From 6f59a0482ed182ed3f544ebde84bbcfdcd9b4680 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 30 Nov 2010 02:12:20 +0000 Subject: Refs #2428 removed some global CONFIG usage in plugins git-svn-id: http://code.elgg.org/elgg/trunk@7479 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/messageboard/start.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'mod/messageboard/start.php') diff --git a/mod/messageboard/start.php b/mod/messageboard/start.php index 56dfce1bd..d12086bf2 100644 --- a/mod/messageboard/start.php +++ b/mod/messageboard/start.php @@ -21,6 +21,11 @@ function messageboard_init() { // add a messageboard widget - only for profile add_widget_type('messageboard', elgg_echo("messageboard:board"), elgg_echo("messageboard:desc"), "profile"); + + // Register actions + $action_path = elgg_get_plugin_path() . 'messageboard/actions'; + elgg_register_action("messageboard/add", "$action_path/add.php"); + elgg_register_action("messageboard/delete", "$action_path/delete.php"); } /** @@ -30,15 +35,13 @@ function messageboard_init() { */ function messageboard_page_handler($page) { - global $CONFIG; - // The username should be the first array entry if (isset($page[0])) { set_input('username', $page[0]); } // Include the standard messageboard index - include($CONFIG->pluginspath . "messageboard/index.php"); + include(elgg_get_plugin_path() . "messageboard/index.php"); } /** @@ -51,7 +54,6 @@ function messageboard_page_handler($page) { * @return bool */ function messageboard_add($poster, $owner, $message, $access_id = ACCESS_PUBLIC) { - global $CONFIG; $result = $owner->annotate('messageboard', $message, $access_id, $poster->guid); if (!$result) { @@ -86,7 +88,3 @@ function messageboard_add($poster, $owner, $message, $access_id = ACCESS_PUBLIC) // Register initialisation callback elgg_register_event_handler('init', 'system', 'messageboard_init'); - -// Register actions -elgg_register_action("messageboard/add", $CONFIG->pluginspath . "messageboard/actions/add.php"); -elgg_register_action("messageboard/delete", $CONFIG->pluginspath . "messageboard/actions/delete.php"); -- cgit v1.2.3