- Patch by chx: made form tokens work.

4.7.x
Dries Buytaert 2006-01-25 13:59:05 +00:00
parent b8832d76a0
commit 0293848199
1 changed files with 2 additions and 2 deletions

View File

@ -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);