? includes/handlers.inc
? modules/simpletest/tests/handlers.test
? modules/simpletest/tests/handlers_test.info
? modules/simpletest/tests/handlers_test.module
? modules/system/system.path_lazy.inc
? modules/system/system.path_precache.inc
Index: profiles/default/default.profile
===================================================================
RCS file: /cvs/drupal/drupal/profiles/default/default.profile,v
retrieving revision 1.38
diff -u -p -r1.38 default.profile
--- profiles/default/default.profile	17 Mar 2009 12:41:54 -0000	1.38
+++ profiles/default/default.profile	17 Mar 2009 14:38:38 -0000
@@ -91,9 +91,10 @@ function default_profile_task_list() {
  */
 function default_profile_tasks(&$task, $url) {
   
-  // Enable 3 standard blocks.
+  // Enable 4 standard blocks.
   db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'user', 'login', 'garland', 1, 0, 'left', '', -1);
   db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'user', 'navigation', 'garland', 1, 0, 'left', '', -1);
+  db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'user', 'administration', 'garland', 1, 0, 'left', '', -1);
   db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'powered-by', 'garland', 1, 10, 'footer', '', -1);
 
   // Insert default user-defined node types into the database. For a complete
Index: profiles/expert/expert.profile
===================================================================
RCS file: /cvs/drupal/drupal/profiles/expert/expert.profile,v
retrieving revision 1.4
diff -u -p -r1.4 expert.profile
--- profiles/expert/expert.profile	10 Feb 2009 03:28:51 -0000	1.4
+++ profiles/expert/expert.profile	17 Mar 2009 14:38:38 -0000
@@ -42,9 +42,10 @@ function expert_profile_task_list() {
  * Perform any final installation tasks for this profile.
  */
 function expert_profile_tasks(&$task, $url) {
-  // Enable 2 standard blocks.
+  // Enable 3 standard blocks.
   db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'user', 'login', 'garland', 1, 0, 'left', '', -1);
   db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'user', 'navigation', 'garland', 1, 0, 'left', '', -1);
+  db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'user', 'administration', 'garland', 1, 0, 'left', '', -1);
 }
 
 /**
Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.314
diff -u -p -r1.314 menu.inc
--- includes/menu.inc	14 Mar 2009 20:56:06 -0000	1.314
+++ includes/menu.inc	17 Mar 2009 14:38:39 -0000
@@ -1332,7 +1332,7 @@ function menu_get_names($reset = FALSE) 
  * Return an array containing the names of system-defined (default) menus.
  */
 function menu_list_system_menus() {
-  return array('navigation', 'main-menu', 'secondary-menu');
+  return array('navigation' => 'Navigation', 'administration' => 'Administration', 'user-menu' => 'User menu', 'main-menu' => 'Main menu');
 }
 
 /**
@@ -1349,11 +1349,11 @@ function menu_secondary_menu() {
 
   // If the secondary menu source is set as the primary menu, we display the
   // second level of the primary menu.
-  if (variable_get('menu_secondary_links_source', 'secondary-menu') == variable_get('menu_main_links_source', 'main-menu')) {
+  if (variable_get('menu_secondary_links_source', 'user-menu') == variable_get('menu_main_links_source', 'main-menu')) {
     return menu_navigation_links(variable_get('menu_main_links_source', 'main-menu'), 1);
   }
   else {
-    return menu_navigation_links(variable_get('menu_secondary_links_source', 'secondary-menu'), 0);
+    return menu_navigation_links(variable_get('menu_secondary_links_source', 'user-menu'), 0);
   }
 }
 
@@ -1583,14 +1583,14 @@ function theme_menu_local_tasks() {
 /**
  * Set (or get) the active menu for the current page - determines the active trail.
  */
-function menu_set_active_menu_name($menu_name = NULL) {
+function menu_set_active_menu_names($menu_names = NULL) {
   static $active;
 
-  if (isset($menu_name)) {
-    $active = $menu_name;
+  if (isset($menu_names) && is_array($menu_names)) {
+    $active = $menu_names;
   }
   elseif (!isset($active)) {
-    $active = 'navigation';
+    $active = variable_get('menu_default_active_menus', array('navigation', 'administration', 'user'));
   }
   return $active;
 }
@@ -1598,8 +1598,8 @@ function menu_set_active_menu_name($menu
 /**
  * Get the active menu for the current page - determines the active trail.
  */
-function menu_get_active_menu_name() {
-  return menu_set_active_menu_name();
+function menu_get_active_menu_names() {
+  return menu_set_active_menu_names();
 }
 
 /**
@@ -1650,9 +1650,26 @@ function menu_set_active_trail($new_trai
         $item = $root_item;
       }
     }
-
-    $tree = menu_tree_page_data(menu_get_active_menu_name());
-    list($key, $curr) = each($tree);
+    $menu_names = menu_get_active_menu_names();
+    $curr = FALSE;
+    // Determine if the current page is a link in any of the active menus.
+    if ($menu_names) {
+      $query = db_select('menu_links', 'ml');
+      $query->fields('ml', array('menu_name'));
+      $query->condition('ml.link_path', $item['href']);
+      $query->condition('ml.menu_name', $menu_names, 'IN');
+      $result = $query->execute();
+      $found = array();
+      foreach ($result as $menu) {
+        $found[] = $menu->menu_name;
+      }
+      // The $menu_names array is ordered, so take the first one that matches.
+      $name = current(array_intersect($menu_names, $found));
+      if ($name !== FALSE) {
+        $tree = menu_tree_page_data($name);
+        list($key, $curr) = each($tree);
+      }
+    }
 
     while ($curr) {
       // Terminate the loop when we find the current path in the active trail.
Index: modules/block/block.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.test,v
retrieving revision 1.12
diff -u -p -r1.12 block.test
--- modules/block/block.test	14 Mar 2009 16:41:29 -0000	1.12
+++ modules/block/block.test	17 Mar 2009 14:38:39 -0000
@@ -16,7 +16,7 @@ class BlockTestCase extends DrupalWebTes
     parent::setUp();
 
     // Create and login user
-    $admin_user = $this->drupalCreateUser(array('administer blocks', 'administer filters'));
+    $admin_user = $this->drupalCreateUser(array('administer blocks', 'administer filters', 'access administration pages'));
     $this->drupalLogin($admin_user);
 
     // Define the existing regions
@@ -89,7 +89,7 @@ class BlockTestCase extends DrupalWebTes
     // Select the Navigation block to be configured and moved.
     $block = array();
     $block['module'] = 'user';
-    $block['delta'] = 'navigation';
+    $block['delta'] = 'administration';
     $block['title'] = $this->randomName(8);
 
     // Set block title to confirm that interface works and override any custom titles.
Index: modules/blog/blog.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.test,v
retrieving revision 1.6
diff -u -p -r1.6 blog.test
--- modules/blog/blog.test	13 Feb 2009 02:22:09 -0000	1.6
+++ modules/blog/blog.test	17 Mar 2009 14:38:39 -0000
@@ -18,7 +18,7 @@ class BlogTestCase extends DrupalWebTest
    * Enable modules and create users with specific permissions.
    */
   function setUp() {
-    parent::setUp('blog');
+    parent::setUp('blog', 'help');
     // Create users.
     $this->big_user = $this->drupalCreateUser(array('administer blocks'));
     $this->own_user = $this->drupalCreateUser(array('create blog content', 'edit own blog content', 'delete own blog content'));
@@ -161,7 +161,6 @@ class BlogTestCase extends DrupalWebTest
     // Confirm a blog page was displayed per user.
     $this->drupalGet('blog/' . $user->uid);
     $this->assertTitle(t("@name's blog | Drupal", array('@name' => $user->name)), t('User blog node was displayed'));
-    $this->assertText(t('Home ' . $crumb . ' Blogs'), t('Breadcrumbs were displayed'));
 
     // Confirm a blog feed was displayed.
     $this->drupalGet('blog/feed');
Index: modules/menu/menu.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.admin.inc,v
retrieving revision 1.41
diff -u -p -r1.41 menu.admin.inc
--- modules/menu/menu.admin.inc	16 Mar 2009 20:31:11 -0000	1.41
+++ modules/menu/menu.admin.inc	17 Mar 2009 14:38:39 -0000
@@ -386,13 +386,14 @@ function menu_edit_item_submit($form, &$
  * Menu callback; Build the form that handles the adding/editing of a custom menu.
  */
 function menu_edit_menu(&$form_state, $type, $menu = array()) {
+  $system_menus = menu_list_system_menus();
   if ($type == 'edit') {
     $form['menu_name'] = array('#type' => 'value', '#value' => $menu['menu_name']);
     $form['#insert'] = FALSE;
     $form['delete'] = array(
       '#type' => 'submit',
       '#value' => t('Delete'),
-      '#access' => !in_array($menu['menu_name'], menu_list_system_menus()),
+      '#access' => !isset($system_menus[$menu['menu_name']]),
       '#submit' => array('menu_custom_delete_submit'),
       '#weight' => 10,
     );
@@ -410,7 +411,7 @@ function menu_edit_menu(&$form_state, $t
   }
   $form['#title'] = $menu['title'];
   $form['title'] = array(
-    '#type' => 'textfield',
+    '#type' => isset($system_menus[$menu['menu_name']]) ? 'value' : 'textfield',
     '#title' => t('Title'),
     '#default_value' => $menu['title'],
     '#required' => TRUE,
@@ -440,7 +441,8 @@ function menu_custom_delete_submit($form
  */
 function menu_delete_menu_page($menu) {
   // System-defined menus may not be deleted.
-  if (in_array($menu['menu_name'], menu_list_system_menus())) {
+  $system_menus = menu_list_system_menus();
+  if (isset($system_menus[$menu['menu_name']])) {
     drupal_access_denied();
     return;
   }
@@ -468,7 +470,8 @@ function menu_delete_menu_confirm_submit
   $menu = $form['#menu'];
   $form_state['redirect'] = 'admin/build/menu';
   // System-defined menus may not be deleted - only menus defined by this module.
-  if (in_array($menu['menu_name'], menu_list_system_menus())  || !db_result(db_query("SELECT COUNT(*) FROM {menu_custom} WHERE menu_name = '%s'", $menu['menu_name']))) {
+  $system_menus = menu_list_system_menus();
+  if (isset($system_menus[$menu['menu_name']])  || !db_result(db_query("SELECT COUNT(*) FROM {menu_custom} WHERE menu_name = '%s'", $menu['menu_name']))) {
     return;
   }
   // Reset all the menu links defined by the system via hook_menu.
@@ -618,7 +621,7 @@ function menu_configure() {
   $form['menu_main_links_source'] = array(
     '#type' => 'select',
     '#title' => t('Source for the Main links'),
-    '#default_value' => $main,
+    '#default_value' => 'main-menu',
     '#options' => $main_options,
     '#tree' => FALSE,
     '#description' => t('Select what should be displayed as the Main links (typically at the top of the page).'),
@@ -628,7 +631,7 @@ function menu_configure() {
   $form["menu_secondary_links_source"] = array(
     '#type' => 'select',
     '#title' => t('Source for the Secondary links'),
-    '#default_value' => 'secondary-menu',
+    '#default_value' => 'user-menu',
     '#options' => $secondary_options,
     '#tree' => FALSE,
     '#description' => t("Select the source for the Secondary links. An advanced option allows you to use the same source for both Main links (currently %main) and Secondary links: if your source menu has two levels of hierarchy, the top level menu links will appear in the Main links, and the children of the active link will appear in the Secondary links." , array('%main' => $main_options[$main])),
Index: modules/menu/menu.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.install,v
retrieving revision 1.14
diff -u -p -r1.14 menu.install
--- modules/menu/menu.install	15 Nov 2008 13:01:07 -0000	1.14
+++ modules/menu/menu.install	17 Mar 2009 14:38:39 -0000
@@ -7,11 +7,17 @@
 function menu_install() {
   // Create tables.
   drupal_install_schema('menu');
-
+  $system_menus = menu_list_system_menus();
+  $descriptions = array(
+    'navigation' => 'The Navigation menu contains links such as for forums or other content. Non-administrative menu links are added to this menu by default.',
+    'user-menu' => "The User menu contains links like 'My account', and 'Log out' and is the default souce for the Secondary links",
+    'administration' => 'The Adminstration menu contains links for content creation, site building, user management, and similar site activites.',
+    'main-menu' => 'The Main menu is the default source for the Main links which are often used by themes to show the major sections of a site.',  
+  );
   $t = get_t();
-  db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'navigation', $t('Navigation'), $t('The navigation menu is provided by Drupal and is the main interactive menu for any site. It is usually the only menu that contains personalized links for authenticated users, and is often not even visible to anonymous users.'));
-  db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'main-menu', $t('Main menu'), $t('The Main menu is often used by themes to show the major sections of a site.'));
-  db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'secondary-menu', $t('Secondary menu'), $t('The Secondary menu is often used for pages like legal notices, contact details, and other navigation items that play a lesser role than the Main menu.'));
+  foreach ($system_menus as $menu_name => $title) {
+    db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", $menu_name, $t($title), $t($descriptions[$menu_name]));
+  }
 }
 
 /**
Index: modules/menu/menu.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.module,v
retrieving revision 1.179
diff -u -p -r1.179 menu.module
--- modules/menu/menu.module	8 Mar 2009 04:25:04 -0000	1.179
+++ modules/menu/menu.module	17 Mar 2009 14:38:39 -0000
@@ -23,7 +23,7 @@ function menu_help($path, $arg) {
       $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@menu">Menu module</a>.', array('@menu' => 'http://drupal.org/handbook/modules/menu/')) . '</p>';
       return $output;
     case 'admin/build/menu':
-      return '<p>' . t('Menus are a collection of links (menu items) used to navigate a website. The menus currently available on your site are displayed below. Select a menu from this list to manage its menu items.') . '</p>';
+      return '<p>' . t('Menus are a collection of links used to navigate a website. If the Block module is enabled, each menu has a corresponding block that is managed on the <a href="@blocks">blocks administration page</a>. Select an existing menu from this list to manage its menu links.', array('@blocks' => url('admin/build/block'))) . '</p>';
     case 'admin/build/menu/add':
       return '<p>' . t('Enter the name for your new menu. Remember to enable the newly created block in the <a href="@blocks">blocks administration page</a>.', array('@blocks' => url('admin/build/block'))) . '</p>';
     case 'admin/build/menu-customize/%':
@@ -260,9 +260,7 @@ function menu_reset_item($item) {
  * Implementation of hook_block_list().
  */
 function menu_block_list() {
-  $menus = menu_get_menus();
-  // The Navigation menu is handled by the user module.
-  unset($menus['navigation']);
+  $menus = menu_get_menus(FALSE);
 
   $blocks = array();
   foreach ($menus as $name => $title) {
@@ -279,10 +277,7 @@ function menu_block_list() {
  * Implementation of hook_block_view().
  */
 function menu_block_view($delta = '') {
-  $menus = menu_get_menus();
-  // The Navigation menu is handled by the user module.
-  unset($menus['navigation']);
-
+  $menus = menu_get_menus(FALSE);
   $data['subject'] = check_plain($menus[$delta]);
   $data['content'] = menu_tree($delta);
   return $data;
@@ -469,7 +464,7 @@ function menu_node_form_submit($form, &$
  *   titles as the values.
  */
 function menu_get_menus($all = TRUE) {
-  $system_menus = menu_list_system_menus();
+  $system_menus = array_keys(menu_list_system_menus());
   $query = db_select('menu_custom');
   $query->addField('menu_custom', 'menu_name', 'menu_name');
   $query->addField('menu_custom', 'title', 'title');
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1031
diff -u -p -r1.1031 node.module
--- modules/node/node.module	14 Mar 2009 23:01:36 -0000	1.1031
+++ modules/node/node.module	17 Mar 2009 14:38:39 -0000
@@ -1731,12 +1731,14 @@ function node_menu() {
     'page callback' => 'node_page_default',
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK,
+    'menu_name' => 'administration',
   );
   $items['node/add'] = array(
     'title' => 'Create content',
     'page callback' => 'node_add_page',
     'access callback' => '_node_add_access',
     'weight' => 1,
+    'menu_name' => 'administration',
   );
   $items['rss.xml'] = array(
     'title' => 'RSS feed',
Index: modules/simpletest/tests/session.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/session.test,v
retrieving revision 1.10
diff -u -p -r1.10 session.test
--- modules/simpletest/tests/session.test	19 Jan 2009 10:46:51 -0000	1.10
+++ modules/simpletest/tests/session.test	17 Mar 2009 14:38:39 -0000
@@ -53,7 +53,7 @@ class SessionTestCase extends DrupalWebT
       'pass' => $user->pass_raw
     );
     $this->drupalPost('user', $edit, t('Log in'));
-    $this->drupalGet('node');
+    $this->drupalGet('user');
     $pass = $this->assertText($user->name, t('Found name: %name', array('%name' => $user->name)), t('User login'));
     $this->_logged_in = $pass;
 
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.672
diff -u -p -r1.672 system.module
--- modules/system/system.module	14 Mar 2009 23:01:37 -0000	1.672
+++ modules/system/system.module	17 Mar 2009 14:38:39 -0000
@@ -458,6 +458,7 @@ function system_menu() {
     'access arguments' => array('access administration pages'),
     'page callback' => 'system_main_admin_page',
     'weight' => 9,
+    'menu_name' => 'administration',
   );
   $items['admin/compact'] = array(
     'title' => 'Compact mode',
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.970
diff -u -p -r1.970 user.module
--- modules/user/user.module	17 Mar 2009 02:07:42 -0000	1.970
+++ modules/user/user.module	17 Mar 2009 14:38:39 -0000
@@ -1012,12 +1012,13 @@ function user_block_list() {
   $blocks['login']['info'] = t('User login');
   // Not worth caching.
   $blocks['login']['cache'] = BLOCK_NO_CACHE;
-
-  $blocks['navigation']['info'] = t('Navigation');
-  // Menu blocks can't be cached because each menu item can have
-  // a custom access callback. menu.inc manages its own caching.
-  $blocks['navigation']['cache'] = BLOCK_NO_CACHE;
-
+  // System-defined menus are presented by user module.
+  foreach (menu_list_system_menus() as $menu_name => $title) {
+    $blocks[$menu_name]['info'] = t($title);
+    // Menu blocks can't be cached because each menu item can have
+    // a custom access callback. menu.inc manages its own caching.
+    $blocks[$menu_name]['cache'] = BLOCK_NO_CACHE;
+  }
   $blocks['new']['info'] = t('Who\'s new');
 
   // Too dynamic to cache.
@@ -1087,13 +1088,6 @@ function user_block_view($delta = '') {
       }
       return $block;
 
-    case 'navigation':
-      if ($menu = menu_tree()) {
-        $block['subject'] = $user->uid ? check_plain($user->name) : t('Navigation');
-        $block['content'] = $menu;
-      }
-      return $block;
-
     case 'new':
       if (user_access('access content')) {
         // Retrieve a list of new users who have subsequently accessed the site successfully.
@@ -1141,6 +1135,15 @@ function user_block_view($delta = '') {
         $block['content'] = $output;
       }
       return $block;
+    default:
+      // All system menu blocks including Navigation.
+      $system_menus = menu_list_system_menus();
+      if (isset($system_menus[$delta])) {
+        $block['subject'] = t($system_menus[$delta]);
+        $block['content'] = menu_tree($delta);
+        return $block;
+      }
+      break;
   }
 }
 
@@ -1269,6 +1272,7 @@ function user_menu() {
     'title' => 'User account',
     'page callback' => 'user_page',
     'access callback' => TRUE,
+    'menu_name' => 'user-menu',
     'type' => MENU_CALLBACK,
   );
 
@@ -1306,6 +1310,7 @@ function user_menu() {
     'access callback' => 'user_is_logged_in',
     'page callback' => 'user_logout',
     'weight' => 10,
+    'menu_name' => 'user-menu',
   );
 
   // User administration pages.
@@ -1373,6 +1378,7 @@ function user_menu() {
     'access callback' => 'user_view_access',
     'access arguments' => array(1),
     'parent' => '',
+    'menu_name' => 'user-menu',
   );
 
   $items['user/%user/view'] = array(
