Commit 02938481 authored by Dries's avatar Dries
Browse files

- Patch by chx: made form tokens work.

parent b8832d76
......@@ -68,9 +68,9 @@ function drupal_get_form($form_id, &$form, $callback = NULL) {
variable_set('drupal_private_key', mt_rand());
}
$form['form_token'] = array('#type' => 'hidden', '#value' => md5(session_id() . $form['#token'] . variable_get('drupal_private_key', '')));
$form['form_token'] = array('#type' => 'hidden', '#default_value' => md5(session_id() . $form['#token'] . variable_get('drupal_private_key', '')));
}
$form['form_id'] = array('#type' => 'hidden', '#default_value' => $form_id);
$form['form_id'] = array('#type' => 'hidden', '#value' => $form_id);
$form = array_merge(_element_info('form'), $form);
......
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