diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-09-11 16:08:09 -0400 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-09-11 16:08:09 -0400 |
commit | d9a044126f07370f1ad258024e3df38d17163f5d (patch) | |
tree | b7894e8e3595a5e9dba5fdd663ec9210a2d5d521 /includes/form.inc | |
parent | 5a37d15cb33e8a3bdd223439db61c491f683a8d6 (diff) | |
download | brdo-d9a044126f07370f1ad258024e3df38d17163f5d.tar.gz brdo-d9a044126f07370f1ad258024e3df38d17163f5d.tar.bz2 |
- Patch #240828 by sun, xjm, David_Rothstein, yoroy: 'This form is outdated. Reload the page and try again' is incorrect and confuses users.
Diffstat (limited to 'includes/form.inc')
-rw-r--r-- | includes/form.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc index 1b5ac372a..b5647972c 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -1082,8 +1082,12 @@ function drupal_validate_form($form_id, &$form, &$form_state) { // matches the current user's session. if (isset($form['#token'])) { if (!drupal_valid_token($form_state['values']['form_token'], $form['#token'])) { + $path = current_path(); + $query = drupal_get_query_parameters(); + $url = url($path, array('query' => $query)); + // Setting this error will cause the form to fail validation. - form_set_error('form_token', t('This form is outdated. Reload the page and try again. Contact the site administrator if the problem persists.')); + form_set_error('form_token', t('The form has become outdated. Copy any unsaved work in the form below and then <a href="@link">reload this page</a>.', array('@link' => $url))); } } |