function search_block

6.x search.module search_block($op = 'list', $delta = 0)

Implementation of hook_block().

File

drupal-6.x/modules/search/search.module, line 149
Enables site-wide keyword searching.

Code

function search_block($op = 'list', $delta = 0) {
  if ($op == 'list') {
    $blocks[0]['info'] = t('Search form');
    // Not worth caching.
    $blocks[0]['cache'] = BLOCK_NO_CACHE;
    return $blocks;
  }
  else if ($op == 'view' && user_access('search content')) {
    $block['content'] = drupal_get_form('search_block_form');
    $block['subject'] = t('Search');
    return $block;
  }
}