diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-02-14 16:43:38 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-02-14 16:43:38 +0000 |
commit | 5254053812ad878471f39c9a2185f9ed98bd1e75 (patch) | |
tree | b50fbbf4aa9bc213ff7b93433bd57018d974ac02 | |
parent | f9605d808aaba003bccd9d5c735e730ffbbe5555 (diff) | |
download | brdo-5254053812ad878471f39c9a2185f9ed98bd1e75.tar.gz brdo-5254053812ad878471f39c9a2185f9ed98bd1e75.tar.bz2 |
- Patch #118183 by chx: tabs fixes.
-rw-r--r-- | includes/menu.inc | 15 | ||||
-rw-r--r-- | modules/search/search.module | 6 |
2 files changed, 10 insertions, 11 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index acd0027a0..f3b6dff05 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -531,18 +531,18 @@ function menu_rebuild() { if (preg_match('/^%([a-z_]*)$/', $part, $matches)) { if (empty($matches[1])) { $match = TRUE; + $load_functions[$k] = NULL; + $to_arg_functions[$k] = NULL; } else { - if (function_exists($matches[1] .'_load')) { - $load_functions[$k] = $matches[1] .'_load'; - $match = TRUE; - } if (function_exists($matches[1] .'_to_arg')) { $to_arg_functions[$k] = $matches[1].'_to_arg'; + $load_functions[$k] = NULL; $match = TRUE; } - if (!isset($load_functions[$k]) && isset($to_arg_functions[$k])) { - $load_functions[$k] = FALSE; + if (function_exists($matches[1] .'_load')) { + $load_functions[$k] = $matches[1] .'_load'; + $match = TRUE; } } } @@ -670,6 +670,9 @@ function menu_rebuild() { if (!isset($item['parent'])) { $item['parent'] = implode('/', array_slice($item['_parts'], 0, $item['_number_parts'] - 1)); } + else { + $item['_depth'] = $item['parent'] ? $menu[$item['parent']]['_depth'] + 1 : 1; + } } else { // Non-tab items specified the parent for visible links, and it's diff --git a/modules/search/search.module b/modules/search/search.module index 323cdcb3f..c2299490e 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -166,7 +166,7 @@ function search_menu() { ); foreach (module_implements('search') as $name) { - $items['search/'. $name .'/%search'] = array( + $items['search/'. $name .'/%'] = array( 'title' => module_invoke($name, 'search', 'name', TRUE), 'page callback' => 'search_view', 'page arguments' => array($name), @@ -183,10 +183,6 @@ function _search_menu($name) { return user_access('search content') && module_invoke($name, 'search', 'name'); } -function search_to_arg() { - return search_get_keys(); -} - /** * Validate callback. */ |