Index: search_block.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/search_block/search_block.module,v retrieving revision 1.1.4.5.2.2 diff -u -p -r1.1.4.5.2.2 search_block.module --- search_block.module 6 Aug 2008 00:58:48 -0000 1.1.4.5.2.2 +++ search_block.module 23 Dec 2008 15:35:45 -0000 @@ -11,20 +11,16 @@ * Implementation of hook_menu(). */ function search_block_menu() { - $items['admin/settings/search/main'] = array( - 'title' => 'Main', - 'access callback' => 'user_access', - 'access arguments' => array('administer search'), - 'type' => MENU_DEFAULT_LOCAL_TASK, - ); - $items['admin/settings/search/restrict'] = array( - 'title' => 'Restrict Search', - 'description' => 'Restrict the node types that are searched.', - 'access callback' => 'user_access', - 'access arguments' => array('restrict searches'), - 'page callback' => 'search_block_restrict_page', - 'type' => MENU_LOCAL_TASK, - ); + $items = array(); + + $items['admin/settings/search/restrict'] = array( + 'title' => 'Restrict Search', + 'description' => 'Restrict the node types that are searched.', + 'access callback' => 'user_access', + 'access arguments' => array('restrict searches'), + 'page callback' => 'search_block_restrict_page', + 'type' => MENU_LOCAL_TASK, + ); return $items; } @@ -104,7 +100,7 @@ function search_block_form_alter(&$form, elseif (isset($form['old_type'])) { $type = $form['old_type']['#value']; } - + $enabled = variable_get('search_block_'. $type, FALSE); switch ($form_id) { @@ -122,7 +118,7 @@ function search_block_form_alter(&$form, from the search index. Changing this overwrites all previous node settings.'), ); break; - + // Here, we allow for a per-node search block. // This is not shown if the content is globally blocked // Perhaps we want to include the reverse option (index a single node)? @@ -152,7 +148,7 @@ function search_block_form_alter(&$form, } } break; - + case 'search_form': if (empty($form['advanced']['type']['#options'])) break; foreach ($form['advanced']['type']['#options'] as $type2 => $name) { @@ -273,12 +269,12 @@ function search_block_cron() { variable_set('search_block_previous_'. $type, $enabled); } } - + // If we've disabled search blocking for a content type or a node // we may still need to reindex it $query = "SELECT nid FROM {search_block} WHERE enabled=0 AND dirty=1"; $result = db_query($query); - + $row = 0; while ($nid = db_result($result)) { _search_block_reindex(node_load($nid)); @@ -321,4 +317,4 @@ function _search_block_reindex($node) { // Update index search_index($node->nid, 'node', $text); -} \ No newline at end of file +}