diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/defaultwidgets/start.php | 4 | ||||
-rw-r--r-- | mod/diagnostics/start.php | 35 | ||||
-rw-r--r-- | mod/logbrowser/start.php | 2 | ||||
-rw-r--r-- | mod/messages/start.php | 18 | ||||
-rw-r--r-- | mod/reportedcontent/start.php | 2 | ||||
-rw-r--r-- | mod/uservalidationbyemail/start.php | 2 |
6 files changed, 33 insertions, 30 deletions
diff --git a/mod/defaultwidgets/start.php b/mod/defaultwidgets/start.php index acac3f338..5dc89503a 100644 --- a/mod/defaultwidgets/start.php +++ b/mod/defaultwidgets/start.php @@ -32,8 +32,8 @@ function defaultwidgets_init() { } // @todo These submenu pages should be DRYed up - elgg_add_admin_submenu_item('default_profile_widgets', elgg_echo('defaultwidgets:menu:profile'), 'appearance'); - elgg_add_admin_submenu_item('default_dashboard_widgets', elgg_echo('defaultwidgets:menu:dashboard'), 'appearance'); + 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'); } /** diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php index 2ede7099d..a80513b6c 100644 --- a/mod/diagnostics/start.php +++ b/mod/diagnostics/start.php @@ -9,8 +9,7 @@ * Initialise the diagnostics tool * */ -function diagnostics_init() -{ +function diagnostics_init() { global $CONFIG; // Register a page handler, so we can have nice URLs @@ -24,10 +23,14 @@ function diagnostics_init() * Adding the diagnostics to the admin menu * */ -function diagnostics_pagesetup() -{ +function diagnostics_pagesetup() { if (elgg_get_context() == 'admin' && isadminloggedin()) { - elgg_add_submenu_item(array('text' => elgg_echo('diagnostics'), 'href' => 'pg/diagnostics/')); + elgg_register_menu_item('page', array( + 'name' => 'diagnostics', + 'title' => elgg_echo('diagnostics'), + 'url' => 'pg/diagnostics/', + 'context' => 'admin', + )); } } @@ -36,8 +39,7 @@ function diagnostics_pagesetup() * * @param array $page Array of page elements, forwarded by the page handling mechanism */ -function diagnostics_page_handler($page) -{ +function diagnostics_page_handler($page) { global $CONFIG; // only interested in one page for now @@ -52,8 +54,7 @@ function diagnostics_page_handler($page) * @param unknown_type $returnvalue * @param unknown_type $params */ -function diagnostics_basic_hook($hook, $entity_type, $returnvalue, $params) -{ +function diagnostics_basic_hook($hook, $entity_type, $returnvalue, $params) { global $CONFIG; // Get version information @@ -73,8 +74,7 @@ function diagnostics_basic_hook($hook, $entity_type, $returnvalue, $params) * @param unknown_type $returnvalue * @param unknown_type $params */ -function diagnostics_plugins_hook($hook, $entity_type, $returnvalue, $params) -{ +function diagnostics_plugins_hook($hook, $entity_type, $returnvalue, $params) { $returnvalue .= elgg_echo('diagnostics:report:plugins', array(print_r(get_installed_plugins(), true))); return $returnvalue; @@ -86,8 +86,7 @@ function diagnostics_plugins_hook($hook, $entity_type, $returnvalue, $params) * @param starting dir $dir * @param buffer $buffer */ -function diagnostics_md5_dir($dir) -{ +function diagnostics_md5_dir($dir) { $extensions_allowed = array('.php', '.js', '.css'); $buffer = ""; @@ -117,8 +116,7 @@ function diagnostics_md5_dir($dir) * @param unknown_type $returnvalue * @param unknown_type $params */ -function diagnostics_sigs_hook($hook, $entity_type, $returnvalue, $params) -{ +function diagnostics_sigs_hook($hook, $entity_type, $returnvalue, $params) { global $CONFIG; $returnvalue .= elgg_echo('diagnostics:report:md5', array(diagnostics_md5_dir($CONFIG->path))); @@ -134,8 +132,7 @@ function diagnostics_sigs_hook($hook, $entity_type, $returnvalue, $params) * @param unknown_type $returnvalue * @param unknown_type $params */ -function diagnostics_phpinfo_hook($hook, $entity_type, $returnvalue, $params) -{ +function diagnostics_phpinfo_hook($hook, $entity_type, $returnvalue, $params) { global $CONFIG; ob_start(); @@ -169,8 +166,7 @@ function diagnostics_phpinfo_hook($hook, $entity_type, $returnvalue, $params) * @param unknown_type $params * @return unknown */ -function diagnostics_globals_hook($hook, $entity_type, $returnvalue, $params) -{ +function diagnostics_globals_hook($hook, $entity_type, $returnvalue, $params) { global $CONFIG; $output = str_replace($CONFIG->dbpass, '<<DBPASS>>', print_r($GLOBALS, true)); @@ -189,4 +185,3 @@ elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_s elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_globals_hook"); // Global variables elgg_register_plugin_hook_handler("diagnostics:report", "system", "diagnostics_phpinfo_hook"); // PHP info -?>
\ No newline at end of file diff --git a/mod/logbrowser/start.php b/mod/logbrowser/start.php index dd3c24bee..9a254ba11 100644 --- a/mod/logbrowser/start.php +++ b/mod/logbrowser/start.php @@ -16,7 +16,7 @@ function logbrowser_init() { elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'logbrowser_user_hover_menu'); - elgg_add_admin_submenu_item('logbrowser', elgg_echo('logbrowser'), 'overview'); + elgg_add_admin_menu_item('logbrowser', elgg_echo('logbrowser'), 'overview'); } /** diff --git a/mod/messages/start.php b/mod/messages/start.php index e8f5105b2..cf17ee013 100644 --- a/mod/messages/start.php +++ b/mod/messages/start.php @@ -11,11 +11,19 @@ elgg_register_event_handler('init', 'system', 'messages_init'); function messages_init() { - // add submenu options - if (elgg_get_context() == "messages") { - add_submenu_item(elgg_echo('messages:inbox'), "pg/messages/" . get_loggedin_user()->username); - add_submenu_item(elgg_echo('messages:sentmessages'), "mod/messages/sent.php"); - } + // add page menu items + elgg_register_menu_item('page', array( + 'name' => 'messages:inbox', + 'title' => elgg_echo('messages:inbox'), + 'url' => "pg/messages/" . get_loggedin_user()->username, + 'context' => 'messages', + )); + elgg_register_menu_item('page', array( + 'name' => 'messages:sentmessages', + 'title' => elgg_echo('messages:sentmessages'), + 'url' => "mod/messages/sent.php", + 'context' => 'messages', + )); // Extend system CSS with our own styles, which are defined in the shouts/css view elgg_extend_view('css/screen', 'messages/css'); diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php index b947927d9..872cf82ea 100644 --- a/mod/reportedcontent/start.php +++ b/mod/reportedcontent/start.php @@ -26,7 +26,7 @@ function reportedcontent_init() { } // Add admin menu item - elgg_add_admin_submenu_item('reportedcontent', elgg_echo('reportedcontent'), 'overview'); + elgg_add_admin_menu_item('reportedcontent', elgg_echo('reportedcontent'), 'overview'); // Register actions $action_path = elgg_get_plugin_path() . "reportedcontent/actions"; diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php index 79b8b7413..9d4233f37 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_submenu_item('unvalidated', elgg_echo('uservalidationbyemail:admin:unvalidated'), 'users'); + elgg_add_admin_menu_item('unvalidated', elgg_echo('uservalidationbyemail:admin:unvalidated'), 'users'); $action_path = dirname(__FILE__) . '/actions'; |