diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-02-05 19:17:00 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-02-05 19:17:00 +0000 |
commit | 9639b7dc5663dcaeb95815691a03167cbc03776f (patch) | |
tree | 507305bbe4886d8447fa9e79d8cbc13a7b29db5b | |
parent | 15590cdc06042524785aaad51d9e72832337dcf8 (diff) | |
download | brdo-9639b7dc5663dcaeb95815691a03167cbc03776f.tar.gz brdo-9639b7dc5663dcaeb95815691a03167cbc03776f.tar.bz2 |
- #44850: Allow search_box() to be used for non-node searches too
-rw-r--r-- | modules/system.module | 10 | ||||
-rw-r--r-- | modules/system/system.module | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/modules/system.module b/modules/system.module index 82cc352d1..5001001ca 100644 --- a/modules/system.module +++ b/modules/system.module @@ -1206,13 +1206,19 @@ function system_theme_settings($key = '') { } -function search_box() { - $form['#action'] = url('search'); +/** + * Output a search form. + */ +function search_box($path = NULL) { + $form['#action'] = is_null($path) ? url('search') : url($path); $form['keys'] = array('#type' => 'textfield', '#size'=> 15, '#value' => '', '#attributes' => array('alt' => t('Enter the terms you wish to search for.'))); $form['submit'] = array('#type' => 'submit', '#value' => t('Search')); return drupal_get_form('search_box', $form); } +/** + * Theme a search form. + */ function theme_search_box($form) { $output = '<div id="search" class="container-inline">'; $output .= form_render($form); diff --git a/modules/system/system.module b/modules/system/system.module index 82cc352d1..5001001ca 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1206,13 +1206,19 @@ function system_theme_settings($key = '') { } -function search_box() { - $form['#action'] = url('search'); +/** + * Output a search form. + */ +function search_box($path = NULL) { + $form['#action'] = is_null($path) ? url('search') : url($path); $form['keys'] = array('#type' => 'textfield', '#size'=> 15, '#value' => '', '#attributes' => array('alt' => t('Enter the terms you wish to search for.'))); $form['submit'] = array('#type' => 'submit', '#value' => t('Search')); return drupal_get_form('search_box', $form); } +/** + * Theme a search form. + */ function theme_search_box($form) { $output = '<div id="search" class="container-inline">'; $output .= form_render($form); |