- Patch by chx: made form tokens work.
parent
b8832d76a0
commit
0293848199
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue