function search_block in Drupal 4
Same name and namespace in other branches
- 5 modules/search/search.module \search_block()
- 6 modules/search/search.module \search_block()
Implementation of hook_block().
File
- modules/
search.module, line 134 - 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'] = search_box('search_block_form');
$block['subject'] = t('Search');
return $block;
}
}
}