You are here

function search_block in Drupal 5

Same name and namespace in other branches
  1. 4 modules/search.module \search_block()
  2. 6 modules/search/search.module \search_block()

Implementation of hook_block().

File

modules/search/search.module, line 123
Enables site-wide keyword searching.

Code

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