From 949a233076ec18f86e60f90a7a8837cb422664af Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 3 Feb 2011 03:33:52 +0000 Subject: Refs #2428 almost done removing CONFIG access - mostly plugin start.php left git-svn-id: http://code.elgg.org/elgg/trunk@7999 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/notifications/start.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'mod/notifications/start.php') diff --git a/mod/notifications/start.php b/mod/notifications/start.php index 624207e89..6f489f94d 100644 --- a/mod/notifications/start.php +++ b/mod/notifications/start.php @@ -8,7 +8,6 @@ function notifications_plugin_init() { - global $CONFIG; elgg_extend_view('css/screen','notifications/css'); @@ -28,8 +27,9 @@ function notifications_plugin_init() { elgg_register_event_handler('create', 'friend', 'notifications_update_friend_notify'); elgg_register_plugin_hook_handler('access:collections:add-user', 'collection', 'notifications_update_collection_notify'); - elgg_register_action("notificationsettings/save", $CONFIG->pluginspath . "notifications/actions/save.php"); - elgg_register_action("notificationsettings/groupsave", $CONFIG->pluginspath . "notifications/actions/groupsave.php"); + $actions_base = elgg_get_plugin_path() . 'notifications/actions'; + elgg_register_action("notificationsettings/save", "$actions_base/save.php"); + elgg_register_action("notificationsettings/groupsave", "$actions_base/groupsave.php"); } /** @@ -38,20 +38,21 @@ function notifications_plugin_init() { * @param array $page Array of url parameters */ function notifications_page_handler($page) { - global $CONFIG; // default to personal notifications if (!isset($page[0])) { $page[0] = 'personal'; } + $base = elgg_get_plugin_path() . 'notifications'; + switch ($page[0]) { case 'group': - require $CONFIG->pluginspath . "notifications/groups.php"; + require "$base/groups.php"; break; case 'personal': default: - require $CONFIG->pluginspath . "notifications/index.php"; + require "$base/index.php"; break; } -- cgit v1.2.3