Index: modules/dashboard/dashboard.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/dashboard/dashboard.module,v
retrieving revision 1.30
diff -u -p -r1.30 dashboard.module
--- modules/dashboard/dashboard.module	4 Jun 2010 23:04:32 -0000	1.30
+++ modules/dashboard/dashboard.module	12 Jun 2010 14:08:19 -0000
@@ -69,7 +69,7 @@ function dashboard_menu_alter(&$items) {
   $items['admin']['title'] = 'Dashboard';
   $items['admin']['page callback'] = 'dashboard_admin';
   $items['admin/dashboard']['type'] = MENU_DEFAULT_LOCAL_TASK;
-  $items['admin/by-task']['type'] = MENU_LOCAL_TASK;
+  $items['admin/index']['type'] = MENU_LOCAL_TASK;
 }
 
 /**
Index: modules/help/help.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/help/help.admin.inc,v
retrieving revision 1.11
diff -u -p -r1.11 help.admin.inc
--- modules/help/help.admin.inc	13 Oct 2009 05:26:57 -0000	1.11
+++ modules/help/help.admin.inc	12 Jun 2010 14:08:19 -0000
@@ -36,9 +36,13 @@ function help_page($name) {
     // Only print list of administration pages if the module in question has
     // any such pages associated to it.
     $admin_tasks = system_get_module_admin_tasks($name);
+    $links = array();
+    foreach ($admin_tasks as $task) {
+      $links[] = l($task['title'], $task['link_path']);
+    }
+
     if (!empty($admin_tasks)) {
-      ksort($admin_tasks);
-      $output .= theme('item_list', array('items' => $admin_tasks, 'title' => t('@module administration pages', array('@module' => $module['name']))));
+      $output .= theme('item_list', array('items' => $links, 'title' => t('@module administration pages', array('@module' => $module['name']))));
     }
 
   }
Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.293
diff -u -p -r1.293 locale.module
--- modules/locale/locale.module	12 May 2010 08:26:14 -0000	1.293
+++ modules/locale/locale.module	12 Jun 2010 14:08:20 -0000
@@ -132,6 +132,7 @@ function locale_menu() {
   );
   $items['admin/config/regional/language/configure/url'] = array(
     'title' => 'URL language detection configuration',
+    'description' => 'Configure URL language detection',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('locale_language_providers_url_form'),
     'access arguments' => array('administer languages'),
@@ -139,6 +140,7 @@ function locale_menu() {
   );
   $items['admin/config/regional/language/configure/session'] = array(
     'title' => 'Session language detection configuration',
+    'description' => 'Configure session language detection',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('locale_language_providers_session_form'),
     'access arguments' => array('administer languages'),
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.287
diff -u -p -r1.287 system.admin.inc
--- modules/system/system.admin.inc	1 Jun 2010 05:08:40 -0000	1.287
+++ modules/system/system.admin.inc	12 Jun 2010 14:08:21 -0000
@@ -9,70 +9,6 @@
 /**
  * Menu callback; Provide the administration overview page.
  */
-function system_main_admin_page($arg = NULL) {
-  // Only continue if provided arguments are expected. This function serves
-  // as the callback for the top-level admin/ page, so any unexpected arguments
-  // are likely the result of someone typing in the URL of an administrative
-  // page that doesn't actually exist; for example, admin/some/random/page.
-  if (isset($arg) && substr($arg, 0, 3) != 'by-') {
-    return MENU_NOT_FOUND;
-  }
-
-  // Check for status report errors.
-  if (system_status(TRUE) && user_access('administer site configuration')) {
-    drupal_set_message(t('One or more problems were detected with your Drupal installation. Check the <a href="@status">status report</a> for more information.', array('@status' => url('admin/reports/status'))), 'error');
-  }
-  $blocks = array();
-  if ($admin = db_query("SELECT menu_name, mlid FROM {menu_links} WHERE link_path = 'admin' AND module = 'system'")->fetchAssoc()) {
-    $result = db_query("
-      SELECT m.*, ml.*
-      FROM {menu_links} ml
-      INNER JOIN {menu_router} m ON ml.router_path = m.path
-      WHERE ml.link_path != 'admin/help' AND menu_name = :menu_name AND ml.plid = :mlid AND hidden = 0", $admin, array('fetch' => PDO::FETCH_ASSOC));
-    foreach ($result as $item) {
-      _menu_link_translate($item);
-      if (!$item['access']) {
-        continue;
-      }
-      // The link 'description' either derived from the hook_menu 'description'
-      // or entered by the user via menu module is saved as the title attribute.
-      if (!empty($item['localized_options']['attributes']['title'])) {
-        $item['description'] = $item['localized_options']['attributes']['title'];
-      }
-      $block = $item;
-      $block['content'] = '';
-      $block['show'] = FALSE;
-      if ($item['block_callback'] && function_exists($item['block_callback'])) {
-        $function = $item['block_callback'];
-        $block['content'] .= $function();
-      }
-      $content = system_admin_menu_block($item);
-      if ((isset($item['page_callback']) && !in_array($item['page_callback'], array('system_admin_menu_block_page', 'system_admin_config_page', 'system_settings_overview'))) || count($content)) {
-        // Only show blocks for items which are not containers, or those which
-        // are containers and do have items we can show.
-        $block['show'] = TRUE;
-        $block['title'] = l($item['title'], $item['href'], $item['localized_options']);
-        if (!empty($content)) {
-          $block['content'] .= theme('admin_block_content', array('content' => $content));
-        }
-      }
-      // Prepare for sorting as in function _menu_tree_check_access().
-      // The weight is offset so it is always positive, with a uniform 5-digits.
-      $blocks[(50000 + $item['weight']) . ' ' . $item['title'] . ' ' . $item['mlid']] = $block;
-    }
-  }
-  if ($blocks) {
-    ksort($blocks);
-    return theme('admin_page', array('blocks' => $blocks));
-  }
-  else {
-    return t('You do not have any administrative items.');
-  }
-}
-
-/**
- * Menu callback; Provide the administration overview page.
- */
 function system_admin_config_page() {
   // Check for status report errors.
   if (system_status(TRUE) && user_access('administer site configuration')) {
@@ -152,26 +88,14 @@ function system_admin_by_module() {
   }
   uasort($module_info, 'system_sort_modules_by_info_name');
   $menu_items = array();
-  $help_arg = module_exists('help') ? drupal_help_arg() : FALSE;
 
   foreach ($module_info as $module => $info) {
-    if ($module == 'help') {
-      continue;
-    }
-
     $admin_tasks = system_get_module_admin_tasks($module);
 
     // Only display a section if there are any available tasks.
     if (count($admin_tasks)) {
-
-      // Check for help links.
-      if ($help_arg && module_invoke($module, 'help', "admin/help#$module", $help_arg)) {
-        $admin_tasks[100] = l(t('Get help'), "admin/help/$module");
-      }
-
       // Sort.
       ksort($admin_tasks);
-
       $menu_items[$info->info['name']] = array($info->info['description'], $admin_tasks);
     }
   }
@@ -2413,7 +2337,6 @@ function theme_system_admin_by_module($v
   $menu_items = $variables['menu_items'];
 
   $stripe = 0;
-  $output = '';
   $container = array('left' => '', 'right' => '');
   $flip = array('left' => 'right', 'right' => 'left');
   $position = 'left';
@@ -2426,7 +2349,7 @@ function theme_system_admin_by_module($v
     if (count($items)) {
       $block = array();
       $block['title'] = $module;
-      $block['content'] = theme('item_list', array('items' => $items));
+      $block['content'] = theme('admin_block_content', array('content' => $items));
       $block['description'] = t($description);
       $block['show'] = TRUE;
 
@@ -2442,6 +2365,7 @@ function theme_system_admin_by_module($v
   }
 
   $output = '<div class="admin clearfix">';
+  $output .= theme('system_compact_link');
   foreach ($container as $id => $data) {
     $output .= '<div class="' . $id . ' clearfix">';
     $output .= $data;
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.933
diff -u -p -r1.933 system.module
--- modules/system/system.module	20 May 2010 08:47:00 -0000	1.933
+++ modules/system/system.module	12 Jun 2010 14:08:22 -0000
@@ -87,7 +87,7 @@ function system_help($path, $arg) {
       $output .= '<dd>' . t('Actions are individual tasks that the system can do, such as unpublishing a piece of content or banning a user. Modules, such as the <a href="@trigger-help">Trigger module</a>, can fire these actions when certain system events happen; for example, when a new post is added or when a user logs in. Modules may also provide additional actions. Visit the <a href="@actions">Actions page</a> to configure actions.', array('@trigger-help' => url('admin/help/trigger'), '@actions' => url('admin/config/system/actions'))) . '</dd>';
       $output .= '</dl>';
       return $output;
-    case 'admin/by-module':
+    case 'admin/index':
       return '<p>' . t('This page shows you all available administration tasks for each module.') . '</p>';
     case 'admin/appearance':
       $output = '<p>' . t('Set and configure the default theme for your website.  Alternative <a href="@themes">themes</a> are available.', array('@themes' => 'http://drupal.org/project/themes')) . '</p>';
@@ -523,7 +523,7 @@ function system_menu() {
   $items['admin'] = array(
     'title' => 'Administer',
     'access arguments' => array('access administration pages'),
-    'page callback' => 'system_main_admin_page',
+    'page callback' => 'system_admin_by_module',
     'weight' => 9,
     'menu_name' => 'management',
     'theme callback' => 'variable_get',
@@ -537,19 +537,11 @@ function system_menu() {
     'type' => MENU_CALLBACK,
     'file' => 'system.admin.inc',
   );
-  $items['admin/by-task'] = array(
-    'title' => 'By task',
-    'page callback' => 'system_main_admin_page',
-    'access arguments' => array('access administration pages'),
-    'type' => MENU_DEFAULT_LOCAL_TASK,
-    'file' => 'system.admin.inc',
-  );
-  $items['admin/by-module'] = array(
-    'title' => 'By module',
+  $items['admin/index'] = array(
+    'title' => 'Index',
     'page callback' => 'system_admin_by_module',
     'access arguments' => array('access administration pages'),
-    'type' => MENU_LOCAL_TASK,
-    'weight' => 2,
+    'type' => MENU_DEFAULT_LOCAL_TASK,
     'file' => 'system.admin.inc',
   );
 
@@ -2761,7 +2753,7 @@ function system_get_module_admin_tasks($
   if (empty($items)) {
     $result = db_query("
        SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.delivery_callback, m.title, m.title_callback, m.title_arguments, m.theme_callback, m.theme_arguments, m.type, ml.*
-       FROM {menu_links} ml INNER JOIN {menu_router} m ON ml.router_path = m.path WHERE ml.link_path LIKE 'admin/%' AND hidden >= 0 AND module = 'system' AND m.number_parts > 2", array(), array('fetch' => PDO::FETCH_ASSOC));
+       FROM {menu_links} ml INNER JOIN {menu_router} m ON ml.router_path = m.path WHERE ml.link_path LIKE 'admin/%' AND hidden >= 0 AND module = 'system' AND m.number_parts > 1 AND page_callback <> 'system_admin_menu_block_page'", array(), array('fetch' => PDO::FETCH_ASSOC));
     foreach ($result as $item) {
       _menu_link_translate($item);
       if ($item['access']) {
@@ -2770,19 +2762,23 @@ function system_get_module_admin_tasks($
     }
   }
 
-  $admin_access = user_access('administer permissions');
   $admin_tasks = array();
   $admin_task_count = 0;
-  // Check for permissions.
-  if (in_array($module, module_implements('permission')) && $admin_access) {
-    $admin_tasks[-1] = l(t('Configure permissions'), 'admin/people/permissions', array('fragment' => 'module-' . $module));
-  }
 
   // Check for menu items that are admin links.
   if (in_array($module, module_implements('menu')) && $menu = module_invoke($module, 'menu')) {
     foreach (array_keys($menu) as $path) {
       if (isset($items[$path])) {
-        $admin_tasks[$items[$path]['title'] . $admin_task_count ++] = l($items[$path]['title'], $path);
+        // The link 'description' — either derived from the hook_menu
+        // 'description' or entered by the user via menu module — is saved as
+        // the title attribute. The title attribute is then unset to reduce
+        // redundancy in admin pages for screen readers.
+        if (!empty($items[$path]['localized_options']['attributes']['title'])) {
+        $items[$path]['description'] = $items[$path]['localized_options']['attributes']['title'];
+      unset($items[$path]['localized_options']['attributes']['title']);
+    }
+
+        $admin_tasks[$items[$path]['title'] . $admin_task_count ++] = $items[$path];
       }
     }
   }
