diff --git a/modules/search/search.module b/modules/search/search.module index 518272a..c8f95e8 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -101,10 +101,6 @@ function search_help($path, $arg) { */ function search_theme() { return array( - 'search_block_form' => array( - 'render element' => 'form', - 'template' => 'search-block-form', - ), 'search_result' => array( 'variables' => array('result' => NULL, 'module' => NULL), 'file' => 'search.pages.inc', @@ -151,12 +147,22 @@ function search_block_info() { */ function search_block_view($delta = '') { if (user_access('search content')) { + $block['subject'] = t('Search'); $block['content'] = drupal_get_form('search_block_form'); return $block; } } /** + * Implements hook_preprocess_block(). + */ +function search_preprocess_block(&$variables) { + if ($variables['block']->module == 'search' && $variables['block']->delta == 'form') { + $variables['classes_array'][] = 'container-inline'; + } +} + +/** * Implements hook_menu(). */ function search_menu() { @@ -1055,33 +1061,6 @@ function search_box_form_submit($form, &$form_state) { } /** - * Process variables for search-block-form.tpl.php. - * - * The $variables array contains the following arguments: - * - $form - * - * @see search-block-form.tpl.php - */ -function template_preprocess_search_block_form(&$variables) { - $variables['search'] = array(); - $hidden = array(); - // Provide variables named after form keys so themers can print each element independently. - foreach (element_children($variables['form']) as $key) { - $type = $variables['form'][$key]['#type']; - if ($type == 'hidden' || $type == 'token') { - $hidden[] = drupal_render($variables['form'][$key]); - } - else { - $variables['search'][$key] = drupal_render($variables['form'][$key]); - } - } - // Hidden form elements have no value to themers. No need for separation. - $variables['search']['hidden'] = implode($hidden); - // Collect all form elements to make it easier to print the whole form. - $variables['search_form'] = implode($variables['search']); -} - -/** * Performs a search by calling hook_search_execute(). * * @param $keys diff --git a/modules/search/search-block-form.tpl.php b/modules/search/search-block-form.tpl.php deleted file mode 100644 index da58403..0000000 --- a/modules/search/search-block-form.tpl.php +++ /dev/null @@ -1,37 +0,0 @@ - - *
- * - *
- * - * @endcode - * - * @see template_preprocess_search_block_form() - */ -?> -
- subject)): ?> -

- - -