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/thewire/start.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'mod/thewire/start.php') diff --git a/mod/thewire/start.php b/mod/thewire/start.php index d66f0ca14..f3d2f0e75 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -18,9 +18,6 @@ */ function thewire_init() { - - // Load system configuration - global $CONFIG; // Set up menu for logged in users add_menu(elgg_echo('thewire:title'), "pg/thewire"); @@ -52,18 +49,21 @@ // Listen to notification events and supply a more useful message for SMS' elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'thewire_notify_message'); + + $action_path = elgg_get_plugin_path() . 'thewire/actions'; + elgg_register_action("thewire/add", "$action_path/add.php"); + elgg_register_action("thewire/delete", "$action_path/delete.php"); } function thewire_pagesetup() { - - global $CONFIG; + + $base_url = elgg_get_site_url(); //add submenu options if (elgg_get_context() == "thewire") { if ((elgg_get_page_owner_guid() == get_loggedin_userid() || !elgg_get_page_owner_guid()) && isloggedin()) { - add_submenu_item(elgg_echo('thewire:read'),$CONFIG->wwwroot."pg/thewire/" . get_loggedin_user()->username); - add_submenu_item(elgg_echo('thewire:everyone'),$CONFIG->wwwroot."mod/thewire/everyone.php"); - //add_submenu_item(elgg_echo('thewire:add'),$CONFIG->wwwroot."mod/thewire/add.php"); + add_submenu_item(elgg_echo('thewire:read'),"{$base_url}pg/thewire/" . get_loggedin_user()->username); + add_submenu_item(elgg_echo('thewire:everyone'),"{$base_url}mod/thewire/everyone.php"); } } @@ -197,9 +197,6 @@ elgg_register_event_handler('init','system','thewire_init'); elgg_register_event_handler('pagesetup','system','thewire_pagesetup'); - // Register actions - global $CONFIG; - elgg_register_action("thewire/add", $CONFIG->pluginspath . "thewire/actions/add.php"); - elgg_register_action("thewire/delete", $CONFIG->pluginspath . "thewire/actions/delete.php"); + ?> -- cgit v1.2.3