aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 17:07:00 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 17:07:00 +0000
commit653517bf635ad6ecb65738b46b11b3056ccca983 (patch)
tree938724e544d32616bd4f42d496db901dd61182d5 /engine/lib
parent92033ed233d2640a060990d27e6173d90a621b9b (diff)
downloadelgg-653517bf635ad6ecb65738b46b11b3056ccca983.tar.gz
elgg-653517bf635ad6ecb65738b46b11b3056ccca983.tar.bz2
Refs #2991. Using section for admin menu.
git-svn-id: http://code.elgg.org/elgg/trunk@8664 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/admin.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php
index 39ba07ad3..bab2da64e 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -126,10 +126,9 @@ function elgg_admin_notice_exists($id) {
* @since 1.8.0
*/
function elgg_register_admin_menu_item($section, $menu_id, $parent_id = NULL, $priority = 100) {
- $menu_name = "admin-$section";
// make sure parent is registered
- if ($parent_id && !elgg_is_menu_item_registered($menu_name, $parent_id)) {
+ if ($parent_id && !elgg_is_menu_item_registered($menu_id, $parent_id)) {
elgg_register_admin_menu_item($section, $parent_id);
}
@@ -145,13 +144,14 @@ function elgg_register_admin_menu_item($section, $menu_id, $parent_id = NULL, $p
$name = "$parent_id:$name";
}
- return elgg_register_menu_item($menu_name, array(
+ return elgg_register_menu_item('page', array(
'name' => $name,
'href' => $href,
'text' => elgg_echo("admin:$name"),
'context' => 'admin',
'parent_name' => $parent_id,
'priority' => $priority,
+ 'section' => $section
));
}
@@ -185,12 +185,13 @@ function admin_init() {
// administer
// dashboard
- elgg_register_menu_item('admin-administer', array(
+ elgg_register_menu_item('page', array(
'name' => 'dashboard',
'href' => 'admin/dashboard',
'text' => elgg_echo('admin:dashboard'),
'context' => 'admin',
'priority' => 10,
+ 'section' => 'administer'
));
// statistics
elgg_register_admin_menu_item('administer', 'statistics', null, 20);
@@ -261,12 +262,13 @@ function elgg_admin_add_plugin_settings_menu() {
foreach ($active_plugins as $plugin) {
$plugin_id = $plugin->getID();
if (elgg_view_exists("settings/$plugin_id/edit")) {
- elgg_register_menu_item('admin-configure', array(
+ elgg_register_menu_item('page', array(
'name' => $plugin_id,
'href' => "admin/plugin_settings/$plugin_id",
'text' => $plugin->manifest->getName(),
'parent_name' => 'plugin_settings',
'context' => 'admin',
+ 'section' => 'configure',
));
}
}