Commit 75897e80 authored by Dries's avatar Dries

- Patch #138706 by Eaton: 2 form API fixes.

parent 8ba14fa4
......@@ -2351,12 +2351,13 @@ function node_delete_confirm($node) {
/**
* Execute node deletion
*/
function node_delete_confirm_submit($form_id, $form_values) {
function node_delete_confirm_submit($form_values, $form, &$form_state) {
if ($form_values['confirm']) {
node_delete($form_values['nid']);
}
return '<front>';
$form_state['redirect'] = '<front>';
return;
}
/**
......
......@@ -1045,7 +1045,7 @@ function search_form($action = '', $keys = '', $type = NULL, $prompt = NULL) {
* value for the basic search form.
*/
function search_form_validate($form_values, $form, &$form_state) {
form_set_value($form['basic']['inline']['processed_keys'], trim($form_values['keys'], $form_state));
form_set_value($form['basic']['inline']['processed_keys'], trim($form_values['keys']), $form_state);
}
/**
......@@ -1089,6 +1089,7 @@ function search_box($form_id) {
* Process a block search form submission.
*/
function search_box_form_submit($form_values, $form, &$form_state) {
$form_id = $form['form_id']['#value'];
$form_state['redirect'] = 'search/node/'. trim($form_values[$form_id .'_keys']);
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment