diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-01 01:50:30 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-01 01:50:30 +0000 |
commit | 34e7b634e6f9200683c5c5d6662f4e8ebd9a5d70 (patch) | |
tree | 7143a5727d76f8d475408111ad13f11378869a49 | |
parent | b8a77c554c4d994ff74ad62149de2416ab53dccb (diff) | |
download | elgg-34e7b634e6f9200683c5c5d6662f4e8ebd9a5d70.tar.gz elgg-34e7b634e6f9200683c5c5d6662f4e8ebd9a5d70.tar.bz2 |
Fixes #3014 using more standard "register" in admin convenience function
git-svn-id: http://code.elgg.org/elgg/trunk@8520 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/admin.php | 36 | ||||
-rw-r--r-- | engine/lib/widgets.php | 2 | ||||
-rw-r--r-- | mod/developers/start.php | 6 | ||||
-rw-r--r-- | mod/diagnostics/start.php | 2 | ||||
-rw-r--r-- | mod/externalpages/start.php | 2 | ||||
-rw-r--r-- | mod/logbrowser/start.php | 2 | ||||
-rw-r--r-- | mod/reportedcontent/start.php | 2 | ||||
-rw-r--r-- | mod/uservalidationbyemail/start.php | 2 |
8 files changed, 27 insertions, 27 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php index b4a55877c..e14dc7826 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -124,11 +124,11 @@ function elgg_admin_notice_exists($id) { * @return bool * @since 1.8.0 */ -function elgg_add_admin_menu_item($menu_id, $parent_id = NULL, $weight = 100) { +function elgg_register_admin_menu_item($menu_id, $parent_id = NULL, $weight = 100) { // make sure parent is registered if ($parent_id && !elgg_is_menu_item_registered('page', $parent_id)) { - elgg_add_admin_menu_item($parent_id); + elgg_register_admin_menu_item($parent_id); } // in the admin section parents never have links @@ -182,29 +182,29 @@ function admin_init() { elgg_register_simplecache_view('js/admin'); // statistics - elgg_add_admin_menu_item('statistics', null, 60); - elgg_add_admin_menu_item('overview', 'statistics'); + elgg_register_admin_menu_item('statistics', null, 60); + elgg_register_admin_menu_item('overview', 'statistics'); // site - elgg_add_admin_menu_item('site', null, 20); - elgg_add_admin_menu_item('basic', 'site', 10); - elgg_add_admin_menu_item('advanced', 'site', 20); + elgg_register_admin_menu_item('site', null, 20); + elgg_register_admin_menu_item('basic', 'site', 10); + elgg_register_admin_menu_item('advanced', 'site', 20); // appearance - elgg_add_admin_menu_item('appearance', null, 30); - elgg_add_admin_menu_item('menu_items', 'appearance', 10); - elgg_add_admin_menu_item('profile_fields', 'appearance', 20); + elgg_register_admin_menu_item('appearance', null, 30); + elgg_register_admin_menu_item('menu_items', 'appearance', 10); + elgg_register_admin_menu_item('profile_fields', 'appearance', 20); // users - elgg_add_admin_menu_item('users', null, 40); - elgg_add_admin_menu_item('add', 'users', 10); - elgg_add_admin_menu_item('online', 'users', 20); - elgg_add_admin_menu_item('newest', 'users', 30); + elgg_register_admin_menu_item('users', null, 40); + elgg_register_admin_menu_item('add', 'users', 10); + elgg_register_admin_menu_item('online', 'users', 20); + elgg_register_admin_menu_item('newest', 'users', 30); // plugins - elgg_add_admin_menu_item('plugins', null, 50); - elgg_add_admin_menu_item('simple', 'plugins', 10); - elgg_add_admin_menu_item('advanced', 'plugins', 20); + elgg_register_admin_menu_item('plugins', null, 50); + elgg_register_admin_menu_item('simple', 'plugins', 10); + elgg_register_admin_menu_item('advanced', 'plugins', 20); // dashboard elgg_register_menu_item('page', array( @@ -255,7 +255,7 @@ function elgg_admin_add_plugin_settings_menu() { return FALSE; } - elgg_add_admin_menu_item('plugin_settings', null, 51); + elgg_register_admin_menu_item('plugin_settings', null, 51); foreach ($active_plugins as $plugin) { $plugin_id = $plugin->getID(); diff --git a/engine/lib/widgets.php b/engine/lib/widgets.php index cd8b657f3..53b4a3309 100644 --- a/engine/lib/widgets.php +++ b/engine/lib/widgets.php @@ -288,7 +288,7 @@ function elgg_default_widgets_init() { $CONFIG->default_widget_info = $default_widgets; if ($default_widgets) { - elgg_add_admin_menu_item('default_widgets', 'appearance', 30); + elgg_register_admin_menu_item('default_widgets', 'appearance', 30); // override permissions for creating widget on logged out / just created entities elgg_register_plugin_hook_handler('container_permissions_check', 'object', 'elgg_default_widgets_permissions_override'); diff --git a/mod/developers/start.php b/mod/developers/start.php index 5dc4cb2b8..8f437e317 100644 --- a/mod/developers/start.php +++ b/mod/developers/start.php @@ -18,9 +18,9 @@ function developers_init() { function developers_setup_menu() { if (elgg_in_context('admin')) { - elgg_add_admin_menu_item('developers'); - elgg_add_admin_menu_item('settings', 'developers'); - elgg_add_admin_menu_item('preview', 'developers'); + elgg_register_admin_menu_item('developers'); + elgg_register_admin_menu_item('settings', 'developers'); + elgg_register_admin_menu_item('preview', 'developers'); } } diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php index 21ee6207d..74c53e2f6 100644 --- a/mod/diagnostics/start.php +++ b/mod/diagnostics/start.php @@ -16,7 +16,7 @@ function diagnostics_init() { elgg_register_page_handler('diagnostics','diagnostics_page_handler'); // Add admin menu item - elgg_add_admin_menu_item('diagnostics', 'utilities'); + elgg_register_admin_menu_item('diagnostics', 'utilities'); // Register some actions $file = elgg_get_plugins_path() . "diagnostics/actions/download.php"; diff --git a/mod/externalpages/start.php b/mod/externalpages/start.php index 16f46326f..cdc400274 100644 --- a/mod/externalpages/start.php +++ b/mod/externalpages/start.php @@ -11,7 +11,7 @@ function expages_init() { elgg_register_page_handler('expages', 'expages_page_handler'); // add a menu item for the admin edit page - elgg_add_admin_menu_item('expages', 'site'); + elgg_register_admin_menu_item('expages', 'site'); // add footer links expages_setup_footer_menu(); diff --git a/mod/logbrowser/start.php b/mod/logbrowser/start.php index f0f4070db..2bbd08980 100644 --- a/mod/logbrowser/start.php +++ b/mod/logbrowser/start.php @@ -14,7 +14,7 @@ function logbrowser_init() { elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'logbrowser_user_hover_menu'); - elgg_add_admin_menu_item('logbrowser', 'utilities'); + elgg_register_admin_menu_item('logbrowser', 'utilities'); } /** diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php index fe7173958..bd5931bd1 100644 --- a/mod/reportedcontent/start.php +++ b/mod/reportedcontent/start.php @@ -38,7 +38,7 @@ function reportedcontent_init() { elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'reportedcontent_user_hover_menu'); // Add admin menu item - elgg_add_admin_menu_item('reportedcontent', 'utilities'); + elgg_register_admin_menu_item('reportedcontent', 'utilities'); elgg_register_widget_type( 'reportedcontent', diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php index ce9a9cd2c..91bb454cf 100644 --- a/mod/uservalidationbyemail/start.php +++ b/mod/uservalidationbyemail/start.php @@ -39,7 +39,7 @@ function uservalidationbyemail_init() { elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'uservalidationbyemail_public_pages'); // admin interface to manually validate users - elgg_add_admin_menu_item('unvalidated', 'users'); + elgg_register_admin_menu_item('unvalidated', 'users'); elgg_extend_view('js/elgg', 'uservalidationbyemail/js'); |