@@ -938,7 +939,7 @@ function drupal_process_form($form_id, &$form, &$form_state) {
// after the batch is processed.
}
// Set a flag to indicate the the form has been processed and executed.
// Set a flag to indicate that the form has been processed and executed.
$form_state['executed']=TRUE;
// Redirect the form based on values in $form_state.
...
...
@@ -1128,6 +1129,17 @@ function drupal_prepare_form($form_id, &$form, &$form_state) {
drupal_alter($hooks,$form,$form_state,$form_id);
}
/**
* Helper function to call form_set_error() if there is a token error.
*/
function_drupal_invalid_token_set_form_error(){
$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('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)));
}
/**
* Validates user-submitted form data in the $form_state array.
...
...
@@ -1162,16 +1174,11 @@ function drupal_validate_form($form_id, &$form, &$form_state) {
}
// If the session token was set by drupal_prepare_form(), ensure that it
// matches the current user's session.
// matches the current user's session. This is duplicate to code in
// form_builder() but left to protect any custom form handling code.
// Setting this error will cause the form to fail validation.
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)));
$message='<p>In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with configuring your database server, see the <a href="http://drupal.org/getting-started/install">installation handbook</a>. If you are unsure what any of this means you should probably contact your hosting provider.</p>'.$message;
$message='Resolve all issues below to continue the installation. For help configuring your database server, see the <a href="http://drupal.org/getting-started/install">installation handbook</a>, or contact your hosting provider.'.$message;