diff options
author | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-12-19 09:44:53 +0000 |
---|---|---|
committer | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-12-19 09:44:53 +0000 |
commit | ff34411675a767f5e7a7fd43d1a013546574cb29 (patch) | |
tree | 019ed7044c8c82b67cd2bc598bc2906b6fc5c35a /modules | |
parent | 124c5aebc2737fa3433bc06927bdfd8ca013d471 (diff) | |
download | brdo-ff34411675a767f5e7a7fd43d1a013546574cb29.tar.gz brdo-ff34411675a767f5e7a7fd43d1a013546574cb29.tar.bz2 |
#102040 by Jose A Reyero. Clean up search menu items, fixing .../search/user under certain permissions.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/search/search.module | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/search/search.module b/modules/search/search.module index a19d62711..70cd29d4d 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -142,8 +142,8 @@ function search_menu($may_cache) { if ($may_cache) { $items[] = array('path' => 'search', 'title' => t('Search'), - 'callback' => 'drupal_get_form', - 'callback arguments' => array('search_view'), + 'callback' => 'search_view', + 'callback arguments' => array('node'), 'access' => user_access('search content'), 'type' => MENU_SUGGESTED_ITEM); $items[] = array('path' => 'admin/settings/search', @@ -173,6 +173,7 @@ function search_menu($may_cache) { if (module_hook($name, 'search') && $title = module_invoke($name, 'search', 'name')) { $items[] = array('path' => 'search/'. $name . $keys, 'title' => $title, 'callback' => 'search_view', + 'callback arguments' => array($name), 'access' => user_access('search content'), 'type' => MENU_LOCAL_TASK); } @@ -890,9 +891,7 @@ function search_get_keys() { /** * Menu callback; presents the search form and/or search results. */ -function search_view() { - $type = arg(1); - +function search_view($type = '') { // Search form submits with POST but redirects to GET. This way we can keep // the search query URL clean as a whistle: // search/type/keyword+keyword |