summaryrefslogtreecommitdiff
path: root/modules/search/search.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/search/search.module')
-rw-r--r--modules/search/search.module26
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/search/search.module b/modules/search/search.module
index 6592ac99c..ce3e8e8ac 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -207,13 +207,13 @@ function _search_menu($name) {
/**
* Validate callback.
*/
-function search_admin_settings_validate($form, &$form_state, $form_values) {
- if ($form_values['op'] == t('Re-index site')) {
+function search_admin_settings_validate($form, &$form_state) {
+ if ($form_state['values']['op'] == t('Re-index site')) {
drupal_goto('admin/settings/search/wipe');
}
// If these settings change, the index needs to be rebuilt.
- if ((variable_get('minimum_word_size', 3) != $form_values['minimum_word_size']) ||
- (variable_get('overlap_cjk', TRUE) != $form_values['overlap_cjk'])) {
+ if ((variable_get('minimum_word_size', 3) != $form_state['values']['minimum_word_size']) ||
+ (variable_get('overlap_cjk', TRUE) != $form_state['values']['overlap_cjk'])) {
drupal_set_message(t('The index will be rebuilt.'));
search_wipe();
}
@@ -1004,7 +1004,7 @@ function search_view($type = 'node') {
* @return
* An HTML string containing the search form.
*/
-function search_form($action = '', $keys = '', $type = NULL, $prompt = NULL) {
+function search_form(&$form_state, $action = '', $keys = '', $type = NULL, $prompt = NULL) {
// Add CSS
drupal_add_css(drupal_get_path('module', 'search') .'/search.css', 'module', 'all', FALSE);
@@ -1044,21 +1044,21 @@ function search_form($action = '', $keys = '', $type = NULL, $prompt = NULL) {
* search_form_validate() is used solely to set the 'processed_keys' form
* value for the basic search form.
*/
-function search_form_validate($form, &$form_state, $form_values) {
- form_set_value($form['basic']['inline']['processed_keys'], trim($form_values['keys']), $form_state);
+function search_form_validate($form, &$form_state) {
+ form_set_value($form['basic']['inline']['processed_keys'], trim($form_state['values']['keys']), $form_state);
}
/**
* Process a search form submission.
*/
-function search_form_submit($form, &$form_state, $form_values) {
- $keys = $form_values['processed_keys'];
+function search_form_submit($form, &$form_state) {
+ $keys = $form_state['values']['processed_keys'];
if ($keys == '') {
form_set_error('keys', t('Please enter some keywords.'));
// Fall through to the drupal_goto() call.
}
- $type = $form_values['module'] ? $form_values['module'] : 'node';
+ $type = $form_state['values']['module'] ? $form_state['values']['module'] : 'node';
$form_state['redirect'] = 'search/'. $type .'/'. $keys;
return;
}
@@ -1066,7 +1066,7 @@ function search_form_submit($form, &$form_state, $form_values) {
/**
* Output a search form for the search block and the theme's search box.
*/
-function search_box($form_id) {
+function search_box(&$form_state, $form_id) {
// Use search_keys instead of keys to avoid ID conflicts with the search block.
$form[$form_id .'_keys'] = array(
'#type' => 'textfield',
@@ -1088,9 +1088,9 @@ function search_box($form_id) {
/**
* Process a block search form submission.
*/
-function search_box_form_submit($form, &$form_state, $form_values) {
+function search_box_form_submit($form, &$form_state) {
$form_id = $form['form_id']['#value'];
- $form_state['redirect'] = 'search/node/'. trim($form_values[$form_id .'_keys']);
+ $form_state['redirect'] = 'search/node/'. trim($form_state['values'][$form_id .'_keys']);
return;
}