aboutsummaryrefslogtreecommitdiff
path: root/mod/messageboard
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-30 02:12:20 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-30 02:12:20 +0000
commit6f59a0482ed182ed3f544ebde84bbcfdcd9b4680 (patch)
treecd5e07ce01084ade525dae1b168225638e28ac59 /mod/messageboard
parent68f09537fcdb4222947a6c8938e4416bcc47e4ec (diff)
downloadelgg-6f59a0482ed182ed3f544ebde84bbcfdcd9b4680.tar.gz
elgg-6f59a0482ed182ed3f544ebde84bbcfdcd9b4680.tar.bz2
Refs #2428 removed some global CONFIG usage in plugins
git-svn-id: http://code.elgg.org/elgg/trunk@7479 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/messageboard')
-rw-r--r--mod/messageboard/start.php14
1 files changed, 6 insertions, 8 deletions
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");