From 9574da507ffca24b9fc6e706928d494a864f46ae Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Sun, 3 Jan 2010 06:58:52 +0000
Subject: [PATCH] - Patch #656470 by mfer, David_Rothstein: remove fake form
 alter hook.

---
 install.php                      | 7 -------
 profiles/default/default.profile | 5 ++---
 profiles/expert/expert.profile   | 5 ++---
 3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/install.php b/install.php
index 5948f5156a51..e5b6500fb72b 100644
--- a/install.php
+++ b/install.php
@@ -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;
 }
 
diff --git a/profiles/default/default.profile b/profiles/default/default.profile
index f864b579c661..89800f66b5e5 100644
--- a/profiles/default/default.profile
+++ b/profiles/default/default.profile
@@ -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'];
   }
diff --git a/profiles/expert/expert.profile b/profiles/expert/expert.profile
index a2b6f2438e13..aab82e9c66cf 100644
--- a/profiles/expert/expert.profile
+++ b/profiles/expert/expert.profile
@@ -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'];
 }
-- 
GitLab