Skip to content
Snippets Groups Projects
Commit 9574da50 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #656470 by mfer, David_Rothstein: remove fake form alter hook.

parent c5fea4f8
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -1674,13 +1674,6 @@ function _install_configure_form($form, &$form_state, &$install_state) {
'#weight' => 15,
);
// Allow the profile to alter this form. $form_state isn't available
// here, but to conform to the hook_form_alter() signature, we pass
// an empty array.
$hook_form_alter = $install_state['parameters']['profile'] . '_form_alter';
if (function_exists($hook_form_alter)) {
$hook_form_alter($form, array(), 'install_configure');
}
return $form;
}
......
......@@ -4,11 +4,10 @@
/**
* Implements hook_form_alter().
*
* Allows the profile to alter the site-configuration form. This is
* called through custom invocation, so $form_state is not populated.
* Allows the profile to alter the site configuration form.
*/
function default_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'install_configure') {
if ($form_id == 'install_configure_form') {
// Set default for site name field.
$form['site_information']['site_name']['#default_value'] = $_SERVER['SERVER_NAME'];
}
......
......@@ -4,9 +4,8 @@
/**
* Implements hook_form_alter().
*
* Allows the profile to alter the site-configuration form. This is
* called through custom invocation, so $form_state is not populated.
* Allows the profile to alter the site configuration form.
*/
function expert_form_install_configure_form_alter(&$form) {
function expert_form_install_configure_form_alter(&$form, $form_state) {
$form['site_information']['site_name']['#default_value'] = $_SERVER['SERVER_NAME'];
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment