diff --git a/modules/book/book.module b/modules/book/book.module index 2df5e988fa91e8a48097ac72340df362aa0f99ce..5b6be57667d792d44e6ddb9ca9ca7f0f636f184c 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -102,6 +102,7 @@ function book_node_view_link($node, $build_mode) { function book_menu() { $items['admin/content/book'] = array( 'title' => 'Books', + 'description' => "Manage your site's book outlines.", 'page callback' => 'book_admin_overview', 'access arguments' => array('administer book outlines'), 'type' => MENU_LOCAL_TASK, diff --git a/modules/node/node.module b/modules/node/node.module index ed203d7b17be44429a638091d9078f3c8d330452..773e97ee58d993bb8443600e2d826cdd0eb1beb1 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1573,7 +1573,7 @@ function _node_add_access() { function node_menu() { $items['admin/content'] = array( 'title' => 'Content', - 'description' => 'Find and manage content and comments.', + 'description' => 'Find and manage content.', 'page callback' => 'drupal_get_form', 'page arguments' => array('node_admin_content'), 'access arguments' => array('administer nodes'), @@ -1582,6 +1582,7 @@ function node_menu() { ); $items['admin/content/node'] = array( 'title' => 'Content', + 'description' => "View, edit, and delete your site's content.", 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, ); diff --git a/modules/system/system.module b/modules/system/system.module index 8a9fad8c5d1ae81cc2b7d67a20a4b295e85f480d..fa308f81b9d97cbe44502393e9844bd42697190b 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -564,6 +564,7 @@ function system_menu() { ); $items['admin/appearance/settings'] = array( 'title' => 'Configure', + 'description' => 'Configure default and theme specific settings.', 'page arguments' => array('system_theme_settings'), 'access arguments' => array('administer site configuration'), 'type' => MENU_LOCAL_TASK, @@ -1661,12 +1662,26 @@ function system_admin_menu_block($item) { } $content = array(); + $default_task = NULL; + $has_subitems = FALSE; $result = db_query(" - SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, m.description, ml.* - FROM {menu_links} ml - LEFT JOIN {menu_router} m ON ml.router_path = m.path - WHERE ml.plid = :plid AND ml.menu_name = :name AND hidden = 0", array(':plid' => $item['mlid'], ':name' => $item['menu_name']), array('fetch' => PDO::FETCH_ASSOC)); + SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, m.description, m.path, m.weight as router_weight, ml.* + FROM {menu_router} m + LEFT JOIN {menu_links} ml ON m.path = ml.router_path + WHERE (ml.plid = :plid AND ml.menu_name = :name AND hidden = 0) OR (m.tab_parent = :path AND m.type IN (:local_task, :default_task))", array(':plid' => $item['mlid'], ':name' => $item['menu_name'], ':path' => $item['path'], ':local_task' => MENU_LOCAL_TASK, ':default_task' => MENU_DEFAULT_LOCAL_TASK), array('fetch' => PDO::FETCH_ASSOC)); foreach ($result as $link) { + if (!isset($link['link_path'])) { + // If this was not an actual link, fake the tab as a menu link, so we + // don't need to special case it beyond this point. + $link['link_title'] = $link['title']; + $link['link_path'] = $link['path']; + $link['options'] = 'a:0:{}'; + $link['weight'] = $link['router_weight']; + } + else { + // We found a non-tab subitem, remember that. + $has_subitems = TRUE; + } _menu_link_translate($link); if (!$link['access']) { continue; @@ -1678,7 +1693,16 @@ function system_admin_menu_block($item) { } // Prepare for sorting as in function _menu_tree_check_access(). // The weight is offset so it is always positive, with a uniform 5-digits. - $content[(50000 + $link['weight']) . ' ' . drupal_strtolower($link['title']) . ' ' . $link['mlid']] = $link; + $key = (50000 + $link['weight']) . ' ' . drupal_strtolower($link['title']) . ' ' . $link['mlid']; + $content[$key] = $link; + if ($link['type'] == MENU_DEFAULT_LOCAL_TASK) { + $default_task = $key; + } + } + if ($has_subitems) { + // If we've had at least one non-tab subitem, remove the link for the + // default task, since that is already broken down to subitems. + unset($content[$default_task]); } ksort($content); $cache[$item['mlid']] = $content; diff --git a/modules/user/user.module b/modules/user/user.module index 05605499a23839f5ac5e8d5c3c814429137a9588..76f69100732e3cf44a33da8f61ef5f49c52cbe95 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1277,11 +1277,6 @@ function user_menu() { 'weight' => -4, 'file' => 'user.admin.inc', ); - $items['admin/people/list'] = array( - 'title' => 'List', - 'type' => MENU_DEFAULT_LOCAL_TASK, - 'weight' => -10, - ); $items['admin/people/create'] = array( 'title' => 'Add user', 'page arguments' => array('create'),