Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.185
diff -u -p -r1.185 menu.inc
--- includes/menu.inc	5 Jul 2007 08:48:57 -0000	1.185
+++ includes/menu.inc	8 Jul 2007 01:14:42 -0000
@@ -331,7 +331,6 @@ function _menu_load_objects($item, &$map
     $path_map = $map;
     foreach ($load_functions as $index => $function) {
       if ($function) {
-
         $return = $function(isset($path_map[$index]) ? $path_map[$index] : '');
         // If callback returned an error or there is no callback, trigger 404.
         if ($return === FALSE) {
@@ -473,14 +472,14 @@ function _menu_translate(&$router_item, 
  * @param map
  *   An array of path arguments (ex: array('node', '5'))
  * @param $to_arg_functions
- *   An array of helper function (ex: array(1 => 'node_load'))
+ *   An array of helper function (ex: array(2 => 'menu_tail_to_arg'))
  */
 function _menu_link_map_translate(&$map, $to_arg_functions) {
   if ($to_arg_functions) {
     $to_arg_functions = unserialize($to_arg_functions);
     foreach ($to_arg_functions as $index => $function) {
       // Translate place-holders into real values.
-      $arg = $function(!empty($map[$index]) ? $map[$index] : '');
+      $arg = $function(!empty($map[$index]) ? $map[$index] : '', $map, $index);
       if (!empty($map[$index]) || isset($arg)) {
         $map[$index] = $arg;
       }
@@ -491,6 +490,10 @@ function _menu_link_map_translate(&$map,
   }
 }
 
+function menu_tail_to_arg($arg, $map, $index) {
+  return implode('/', array_slice($map, $index));
+}
+
 /**
  * This function is similar to _menu_translate() but does link-specific
  * preparation such as always calling to_arg functions
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.228
diff -u -p -r1.228 search.module
--- modules/search/search.module	1 Jul 2007 17:41:16 -0000	1.228
+++ modules/search/search.module	8 Jul 2007 01:14:42 -0000
@@ -186,14 +186,14 @@ function search_menu() {
   );
 
   foreach (module_implements('search') as $name) {
-    $items['search/'. $name .'/%'] = array(
+    $items['search/'. $name .'/%menu_tail'] = array(
       'title callback' => 'module_invoke',
       'title arguments' => array($name, 'search', 'name', TRUE),
       'page callback' => 'search_view',
       'page arguments' => array($name),
       'access callback' => '_search_menu',
       'access arguments' => array($name),
-      'type' => $name == 'node' ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,
+      'type' => MENU_LOCAL_TASK,
       'parent' => 'search',
     );
   }
