aboutsummaryrefslogtreecommitdiff
path: root/mod/defaultwidgets
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-03 12:07:28 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-03 12:07:28 +0000
commit755947e111d89d6babcd0f070d91c2245e22a809 (patch)
tree284e62a3f1cfca8f9d23e88680544cde4f5aea79 /mod/defaultwidgets
parent949a233076ec18f86e60f90a7a8837cb422664af (diff)
downloadelgg-755947e111d89d6babcd0f070d91c2245e22a809.tar.gz
elgg-755947e111d89d6babcd0f070d91c2245e22a809.tar.bz2
Refs #2428 just a few more CONFIG uses left to be replaced
git-svn-id: http://code.elgg.org/elgg/trunk@8000 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/defaultwidgets')
-rw-r--r--mod/defaultwidgets/start.php17
1 files changed, 8 insertions, 9 deletions
diff --git a/mod/defaultwidgets/start.php b/mod/defaultwidgets/start.php
index 4e6766dd4..acc8951d3 100644
--- a/mod/defaultwidgets/start.php
+++ b/mod/defaultwidgets/start.php
@@ -11,8 +11,6 @@
*
*/
-global $CONFIG;
-
/**
* Default widgets initialisation
*
@@ -31,6 +29,13 @@ function defaultwidgets_init() {
elgg_register_event_handler('validate', 'user', 'defaultwidgets_reset_access');
}
+ $action_dir = elgg_get_plugin_path() . 'defaultwidgets/actions';
+ elgg_register_action("defaultwidgets/update", "$action_dir/update.php", 'admin');
+
+ elgg_register_plugin_hook_handler('permissions_check', 'user', 'defaultwidgets_can_edit');
+ elgg_register_plugin_hook_handler('permissions_check', 'object', 'defaultwidgets_can_edit');
+ elgg_register_plugin_hook_handler('container_permissions_check', 'user', 'defaultwidgets_can_edit_container');
+
// @todo These submenu pages should be DRYed up
//elgg_add_admin_menu_item('default_profile_widgets', elgg_echo('defaultwidgets:menu:profile'), 'appearance');
//elgg_add_admin_menu_item('default_dashboard_widgets', elgg_echo('defaultwidgets:menu:dashboard'), 'appearance');
@@ -92,7 +97,7 @@ function defaultwidgets_newusers($event, $object_type, $object) {
// this is an admin-created user
// no permissions problems, so set proper access now
// use system default access (not the admin's default access!, because that could be a personal access level)
- $widget_access = $CONFIG->default_access;
+ $widget_access = elgg_get_config('default_access');
} else {
// this is a regular registration
// set widget access to public for now and reset it properly during the validate event
@@ -199,9 +204,3 @@ function defaultwidgets_reset_access($event, $object_type, $object) {
// Make sure the status initialisation function is called on initialisation
elgg_register_event_handler('init', 'system', 'defaultwidgets_init');
-
-elgg_register_plugin_hook_handler('permissions_check', 'user', 'defaultwidgets_can_edit');
-elgg_register_plugin_hook_handler('permissions_check', 'object', 'defaultwidgets_can_edit');
-elgg_register_plugin_hook_handler('container_permissions_check', 'user', 'defaultwidgets_can_edit_container');
-
-elgg_register_action("defaultwidgets/update", $CONFIG->pluginspath . "defaultwidgets/actions/update.php", 'admin');