aboutsummaryrefslogtreecommitdiff
path: root/mod/thewire/start.php
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/thewire/start.php
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/thewire/start.php')
-rw-r--r--mod/thewire/start.php21
1 files changed, 9 insertions, 12 deletions
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");
+
?>