? search.patch
? sites/localhost
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.207
diff -u -p -r1.207 search.module
--- modules/search/search.module	19 Dec 2006 09:44:53 -0000	1.207
+++ modules/search/search.module	12 Jan 2007 22:13:12 -0000
@@ -143,7 +143,6 @@ function search_menu($may_cache) {
     $items[] = array('path' => 'search',
       'title' => t('Search'),
       'callback' => 'search_view',
-      'callback arguments' => array('node'),
       'access' => user_access('search content'),
       'type' => MENU_SUGGESTED_ITEM);
     $items[] = array('path' => 'admin/settings/search',
@@ -892,6 +891,10 @@ function search_get_keys() {
  * Menu callback; presents the search form and/or search results.
  */
 function search_view($type = '') {
+  if (!module_invoke(preg_replace('[^a-zA-Z_]', '', $type), 'search', 'name')) {
+    drupal_access_denied();
+    return;
+  }
   // 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
