Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.202
diff -u -p -r1.202 install.php
--- install.php	25 Aug 2009 21:53:46 -0000	1.202
+++ install.php	10 Sep 2009 03:36:29 -0000
@@ -802,7 +802,7 @@ function install_verify_settings() {
  * @return
  *   The form API definition for the database configuration form.
  */
-function install_settings_form(&$form_state, &$install_state) {
+function install_settings_form(&$form, &$form_state, &$install_state) {
   global $databases, $db_prefix;
   $profile = $install_state['parameters']['profile'];
   $install_locale = $install_state['parameters']['locale'];
@@ -1071,7 +1071,7 @@ function _install_select_profile($profil
  * @param $profile_files
  *   Array of .profile files, as returned from file_scan_directory().
  */
-function install_select_profile_form(&$form_state, $profile_files) {
+function install_select_profile_form(&$form, &$form_state, $profile_files) {
   $profiles = array();
   $names = array();
 
@@ -1208,7 +1208,7 @@ function install_select_locale(&$install
 /**
  * Form API array definition for language selection.
  */
-function install_select_locale_form(&$form_state, $locales) {
+function install_select_locale_form(&$form, &$form_state, $locales) {
   include_once DRUPAL_ROOT . '/includes/iso.inc';
   $languages = _locale_get_predefined_list();
   foreach ($locales as $locale) {
@@ -1340,7 +1340,7 @@ function install_import_locales(&$instal
  * @return
  *   The form API definition for the site configuration form.
  */
-function install_configure_form(&$form_state, &$install_state) {
+function install_configure_form(&$form, &$form_state, &$install_state) {
   if (variable_get('site_name', FALSE) || variable_get('site_mail', FALSE)) {
     // Site already configured: This should never happen, means re-running the
     // installer, possibly by an attacker after the 'install_task' variable got
@@ -1532,7 +1532,7 @@ function install_check_requirements($ins
 /**
  * Form API array definition for site configuration.
  */
-function _install_configure_form(&$form_state, &$install_state) {
+function _install_configure_form(&$form, &$form_state, &$install_state) {
   include_once DRUPAL_ROOT . '/includes/locale.inc';
 
   $form['site_information'] = array(
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.370
diff -u -p -r1.370 form.inc
--- includes/form.inc	5 Sep 2009 15:05:01 -0000	1.370
+++ includes/form.inc	10 Sep 2009 03:40:05 -0000
@@ -464,10 +464,15 @@ function drupal_retrieve_form($form_id, 
     }
   }
 
- // We need to pass $form_state by reference in order for forms to modify it,
- // since call_user_func_array() requires that referenced variables be passed
- // explicitly.
-  $args = array_merge(array(&$form_state), $args);
+  // If defined, invoke a wrapper callback to prefill the $form array.
+  if (isset($form_state['wrapper callback']) && function_exists($form_state['wrapper callback'])) {
+    $form = array();
+    $form_state['wrapper callback']($form, $form_state);
+  }
+  // We need to pass $form_state by reference in order for forms to modify it,
+  // since call_user_func_array() requires that referenced variables be passed
+  // explicitly.
+  $args = array_merge(array(&$form, &$form_state), $args);
 
   // If $callback was returned by a hook_forms() implementation, call it.
   // Otherwise, call the function named after the form id.
Index: includes/locale.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/locale.inc,v
retrieving revision 1.226
diff -u -p -r1.226 locale.inc
--- includes/locale.inc	22 Aug 2009 14:34:17 -0000	1.226
+++ includes/locale.inc	10 Sep 2009 03:36:29 -0000
@@ -210,7 +210,7 @@ function locale_languages_custom_form() 
  * @param $langcode
  *   Language code of the language to edit.
  */
-function locale_languages_edit_form(&$form_state, $langcode) {
+function locale_languages_edit_form(&$form, &$form_state, $langcode) {
   if ($language = db_query("SELECT * FROM {languages} WHERE language = :language", array(':language' => $langcode))->fetchObject()) {
     $form = array();
     _locale_languages_common_controls($form, $language);
@@ -406,7 +406,7 @@ function locale_languages_edit_form_subm
 /**
  * User interface for the language deletion confirmation screen.
  */
-function locale_languages_delete_form(&$form_state, $langcode) {
+function locale_languages_delete_form(&$form, &$form_state, $langcode) {
 
   // Do not allow deletion of English locale.
   if ($langcode == 'en') {
@@ -816,7 +816,7 @@ function locale_translate_export_screen(
  * @param $names
  *   An associate array with localized language names
  */
-function locale_translate_export_po_form(&$form_state, $names) {
+function locale_translate_export_po_form(&$form, &$form_state, $names) {
   $form['export'] = array('#type' => 'fieldset',
     '#title' => t('Export translation'),
     '#collapsible' => TRUE,
@@ -881,7 +881,7 @@ function locale_translate_export_po_form
 /**
  * User interface for string editing.
  */
-function locale_translate_edit_form(&$form_state, $lid) {
+function locale_translate_edit_form(&$form, &$form_state, $lid) {
   // Fetch source string, if possible.
   $source = db_query('SELECT source, context, textgroup, location FROM {locales_source} WHERE lid = :lid', array(':lid' => $lid))->fetchObject();
   if (!$source) {
@@ -1051,7 +1051,7 @@ function locale_translate_delete_page($l
 /**
  * User interface for the string deletion confirmation screen.
  */
-function locale_translate_delete_form(&$form_state, $source) {
+function locale_translate_delete_form(&$form, &$form_state, $source) {
   $form['lid'] = array('#type' => 'value', '#value' => $source->lid);
   return confirm_form($form, t('Are you sure you want to delete the string "%source"?', array('%source' => $source->source)), 'admin/config/regional/translate/translate', t('Deleting the string will remove all translations of this string in all languages. This action cannot be undone.'), t('Delete'), t('Cancel'));
 }
Index: modules/aggregator/aggregator.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.admin.inc,v
retrieving revision 1.42
diff -u -p -r1.42 aggregator.admin.inc
--- modules/aggregator/aggregator.admin.inc	24 Aug 2009 17:11:41 -0000	1.42
+++ modules/aggregator/aggregator.admin.inc	10 Sep 2009 03:36:29 -0000
@@ -58,7 +58,7 @@ function aggregator_view() {
  * @see aggregator_form_feed_validate()
  * @see aggregator_form_feed_submit()
  */
-function aggregator_form_feed(&$form_state, stdClass $feed = NULL) {
+function aggregator_form_feed(&$form, &$form_state, stdClass $feed = NULL) {
   $period = drupal_map_assoc(array(900, 1800, 3600, 7200, 10800, 21600, 32400, 43200, 64800, 86400, 172800, 259200, 604800, 1209600, 2419200), 'format_interval');
   $period[AGGREGATOR_CLEAR_NEVER] = t('Never');
 
@@ -196,7 +196,7 @@ function aggregator_form_feed_submit($fo
   }
 }
 
-function aggregator_admin_remove_feed($form_state, $feed) {
+function aggregator_admin_remove_feed(&$form, $form_state, $feed) {
   return confirm_form(
     array(
       'feed' => array(
@@ -230,7 +230,7 @@ function aggregator_admin_remove_feed_su
  * @see aggregator_form_opml_validate()
  * @see aggregator_form_opml_submit()
  */
-function aggregator_form_opml(&$form_state) {
+function aggregator_form_opml(&$form, &$form_state) {
   $period = drupal_map_assoc(array(900, 1800, 3600, 7200, 10800, 21600, 32400, 43200, 64800, 86400, 172800, 259200, 604800, 1209600, 2419200), 'format_interval');
 
   $form['upload'] = array(
@@ -390,7 +390,7 @@ function aggregator_admin_refresh_feed($
  *
  * @ingroup forms
  */
-function aggregator_admin_form($form_state) {
+function aggregator_admin_form(&$form, $form_state) {
   // Make sure configuration is sane.
   aggregator_sanitize_configuration();
 
@@ -496,7 +496,7 @@ function aggregator_admin_form_submit($f
  * @see aggregator_form_category_validate()
  * @see aggregator_form_category_submit()
  */
-function aggregator_form_category(&$form_state, $edit = array('title' => '', 'description' => '', 'cid' => NULL)) {
+function aggregator_form_category(&$form, &$form_state, $edit = array('title' => '', 'description' => '', 'cid' => NULL)) {
   $form['title'] = array('#type' => 'textfield',
     '#title' => t('Title'),
     '#default_value' => $edit['title'],
Index: modules/block/block.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v
retrieving revision 1.54
diff -u -p -r1.54 block.admin.inc
--- modules/block/block.admin.inc	31 Aug 2009 17:06:08 -0000	1.54
+++ modules/block/block.admin.inc	10 Sep 2009 03:36:29 -0000
@@ -49,7 +49,7 @@ function block_admin_display($theme = NU
 /**
  * Generate main blocks administration form.
  */
-function block_admin_display_form(&$form_state, $blocks, $theme = NULL) {
+function block_admin_display_form(&$form, &$form_state, $blocks, $theme = NULL) {
   global $theme_key, $custom_theme;
 
   drupal_add_css(drupal_get_path('module', 'block') . '/block.css', array('preprocess' => FALSE));
@@ -179,7 +179,7 @@ function _block_compare($a, $b) {
 /**
  * Menu callback; displays the block configuration form.
  */
-function block_admin_configure(&$form_state, $module = NULL, $delta = 0) {
+function block_admin_configure(&$form, &$form_state, $module = NULL, $delta = 0) {
   $form['module'] = array(
     '#type' => 'value',
     '#value' => $module,
@@ -430,7 +430,7 @@ function block_admin_configure_submit($f
 /**
  * Menu callback: display the custom block addition form.
  */
-function block_add_block_form(&$form_state) {
+function block_add_block_form(&$form, &$form_state) {
   return block_admin_configure($form_state, 'block', NULL);
 }
 
@@ -513,7 +513,7 @@ function block_add_block_form_submit($fo
 /**
  * Menu callback; confirm deletion of custom blocks.
  */
-function block_custom_block_delete(&$form_state, $bid = 0) {
+function block_custom_block_delete(&$form, &$form_state, $bid = 0) {
   $custom_block = block_custom_block_get($bid);
   $form['info'] = array('#type' => 'hidden', '#value' => $custom_block['info'] ? $custom_block['info'] : $custom_block['title']);
   $form['bid'] = array('#type' => 'hidden', '#value' => $bid);
Index: modules/book/book.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.admin.inc,v
retrieving revision 1.21
diff -u -p -r1.21 book.admin.inc
--- modules/book/book.admin.inc	22 Aug 2009 14:34:18 -0000	1.21
+++ modules/book/book.admin.inc	10 Sep 2009 03:36:29 -0000
@@ -77,7 +77,7 @@ function book_admin_settings_validate($f
  *
  * @ingroup forms.
  */
-function book_admin_edit($form_state, $node) {
+function book_admin_edit(&$form, $form_state, $node) {
   drupal_set_title($node->title);
   $form = array();
   $form['#node'] = $node;
Index: modules/book/book.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.pages.inc,v
retrieving revision 1.15
diff -u -p -r1.15 book.pages.inc
--- modules/book/book.pages.inc	17 Aug 2009 07:12:15 -0000	1.15
+++ modules/book/book.pages.inc	10 Sep 2009 03:36:29 -0000
@@ -102,7 +102,7 @@ function book_outline($node) {
  *
  * @ingroup forms
  */
-function book_outline_form(&$form_state, $node) {
+function book_outline_form(&$form, &$form_state, $node) {
   if (!isset($node->book)) {
     // The node is not part of any book yet - set default options.
     $node->book = _book_link_defaults($node->nid);
@@ -186,7 +186,7 @@ function book_outline_form_submit($form,
  *
  * @ingroup forms
  */
-function book_remove_form(&$form_state, $node) {
+function book_remove_form(&$form, &$form_state, $node) {
   $form['#node'] = $node;
   $title = array('%title' => $node->title);
 
Index: modules/color/color.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/color/color.module,v
retrieving revision 1.70
diff -u -p -r1.70 color.module
--- modules/color/color.module	5 Sep 2009 15:05:02 -0000	1.70
+++ modules/color/color.module	10 Sep 2009 03:36:29 -0000
@@ -132,7 +132,7 @@ function color_get_palette($theme, $defa
 /**
  * Form callback. Returns the configuration form.
  */
-function color_scheme_form(&$form_state, $theme) {
+function color_scheme_form(&$form, &$form_state, $theme) {
   $base = drupal_get_path('module', 'color');
   $info = color_get_info($theme);
 
Index: modules/comment/comment.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.admin.inc,v
retrieving revision 1.31
diff -u -p -r1.31 comment.admin.inc
--- modules/comment/comment.admin.inc	25 Aug 2009 10:27:14 -0000	1.31
+++ modules/comment/comment.admin.inc	10 Sep 2009 03:36:29 -0000
@@ -159,7 +159,7 @@ function comment_admin_overview_submit($
  * @ingroup forms
  * @see comment_multiple_delete_confirm_submit()
  */
-function comment_multiple_delete_confirm(&$form_state) {
+function comment_multiple_delete_confirm(&$form, &$form_state) {
   $edit = $form_state['input'];
 
   $form['comments'] = array(
@@ -232,7 +232,7 @@ function comment_delete_page($cid = NULL
  * @ingroup forms
  * @see comment_confirm_delete_submit()
  */
-function comment_confirm_delete(&$form_state, $comment) {
+function comment_confirm_delete(&$form, &$form_state, $comment) {
   $form = array();
   $form['#comment'] = $comment;
   return confirm_form(
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.767
diff -u -p -r1.767 comment.module
--- modules/comment/comment.module	5 Sep 2009 15:05:02 -0000	1.767
+++ modules/comment/comment.module	10 Sep 2009 03:36:29 -0000
@@ -1611,7 +1611,7 @@ function comment_get_display_page($cid, 
  * @see comment_form_validate()
  * @see comment_form_submit()
  */
-function comment_form(&$form_state, $comment) {
+function comment_form(&$form, &$form_state, $comment) {
   global $user;
 
   $op = isset($_POST['op']) ? $_POST['op'] : '';
Index: modules/contact/contact.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.admin.inc,v
retrieving revision 1.14
diff -u -p -r1.14 contact.admin.inc
--- modules/contact/contact.admin.inc	19 Aug 2009 12:56:47 -0000	1.14
+++ modules/contact/contact.admin.inc	10 Sep 2009 03:36:29 -0000
@@ -39,7 +39,7 @@ function contact_admin_categories() {
 /**
  * Category edit page.
  */
-function contact_admin_edit($form_state = array(), $op, $contact = NULL) {
+function contact_admin_edit(&$form, $form_state = array(), $op, $contact = NULL) {
 
   if (empty($contact) || $op == 'add') {
     $contact = array(
@@ -138,7 +138,7 @@ function contact_admin_edit_submit($form
 /**
  * Category delete page.
  */
-function contact_admin_delete(&$form_state, $contact) {
+function contact_admin_delete(&$form, &$form_state, $contact) {
 
   $form['contact'] = array(
     '#type' => 'value',
Index: modules/contact/contact.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.pages.inc,v
retrieving revision 1.23
diff -u -p -r1.23 contact.pages.inc
--- modules/contact/contact.pages.inc	20 Jul 2009 18:51:33 -0000	1.23
+++ modules/contact/contact.pages.inc	10 Sep 2009 03:36:29 -0000
@@ -171,7 +171,7 @@ function contact_personal_page($account)
 /**
  * Form builder; the personal contact form.
  */
-function contact_personal_form(&$form_state, $recipient) {
+function contact_personal_form(&$form, &$form_state, $recipient) {
   global $user;
   $form['#token'] = $user->name . $user->mail;
   $form['recipient'] = array('#type' => 'value', '#value' => $recipient);
Index: modules/dblog/dblog.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v
retrieving revision 1.29
diff -u -p -r1.29 dblog.admin.inc
--- modules/dblog/dblog.admin.inc	25 Aug 2009 10:27:14 -0000	1.29
+++ modules/dblog/dblog.admin.inc	10 Sep 2009 03:36:29 -0000
@@ -367,7 +367,7 @@ function dblog_clear_log_form() {
 /**
  * Submit callback: clear database with log messages.
  */
-function dblog_clear_log_submit(&$form_state, $form) {
+function dblog_clear_log_submit(&$form, &$form_state, $form) {
   db_delete('watchdog')->execute();
   drupal_set_message(t('Database log cleared.'));
 }
Index: modules/field_ui/field_ui.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field_ui/field_ui.admin.inc,v
retrieving revision 1.12
diff -u -p -r1.12 field_ui.admin.inc
--- modules/field_ui/field_ui.admin.inc	7 Sep 2009 15:49:01 -0000	1.12
+++ modules/field_ui/field_ui.admin.inc	10 Sep 2009 03:36:29 -0000
@@ -65,7 +65,7 @@ function field_ui_inactive_message($bund
  *
  * Allows fields and pseudo-fields to be re-ordered.
  */
-function field_ui_field_overview_form(&$form_state, $obj_type, $bundle) {
+function field_ui_field_overview_form(&$form, &$form_state, $obj_type, $bundle) {
   $bundle = field_attach_extract_bundle($obj_type, $bundle);
 
   field_ui_inactive_message($bundle);
@@ -550,7 +550,7 @@ function field_ui_field_overview_form_su
  * This form includes form widgets to select which fields appear in teaser and
  * full build modes, and how the field labels should be rendered.
  */
-function field_ui_display_overview_form(&$form_state, $obj_type, $bundle, $build_modes_selector = 'basic') {
+function field_ui_display_overview_form(&$form, &$form_state, $obj_type, $bundle, $build_modes_selector = 'basic') {
   $bundle = field_attach_extract_bundle($obj_type, $bundle);
 
   field_ui_inactive_message($bundle);
@@ -790,7 +790,7 @@ function field_ui_field_has_data($field)
 /**
  * Menu callback; presents the field settings edit page.
  */
-function field_ui_field_settings_form(&$form_state, $obj_type, $bundle, $instance) {
+function field_ui_field_settings_form(&$form, &$form_state, $obj_type, $bundle, $instance) {
   $bundle = field_attach_extract_bundle($obj_type, $bundle);
   $field = field_info_field($instance['field_name']);
 
@@ -887,7 +887,7 @@ function field_ui_field_settings_form_su
 /**
  * Menu callback; select a widget for the field.
  */
-function field_ui_widget_type_form(&$form_state, $obj_type, $bundle, $instance) {
+function field_ui_widget_type_form(&$form, &$form_state, $obj_type, $bundle, $instance) {
   $bundle = field_attach_extract_bundle($obj_type, $bundle);
   $field = field_read_field($instance['field_name']);
 
@@ -946,7 +946,7 @@ function field_ui_widget_type_form_submi
 /**
  * Menu callback; present a form for removing a field from a content type.
  */
-function field_ui_field_delete_form(&$form_state, $obj_type, $bundle, $instance) {
+function field_ui_field_delete_form(&$form, &$form_state, $obj_type, $bundle, $instance) {
   $bundle = field_attach_extract_bundle($obj_type, $bundle);
   $field = field_info_field($instance['field_name']);
   $admin_path = _field_ui_bundle_admin_path($bundle);
@@ -1000,7 +1000,7 @@ function field_ui_field_delete_form_subm
 /**
  * Menu callback; presents the field instance edit page.
  */
-function field_ui_field_edit_form(&$form_state, $obj_type, $bundle, $instance) {
+function field_ui_field_edit_form(&$form, &$form_state, $obj_type, $bundle, $instance) {
   $bundle = field_attach_extract_bundle($obj_type, $bundle);
 
   $field = field_info_field($instance['field_name']);
Index: modules/file/tests/file_module_test.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/file/tests/file_module_test.module,v
retrieving revision 1.1
diff -u -p -r1.1 file_module_test.module
--- modules/file/tests/file_module_test.module	29 Aug 2009 12:52:32 -0000	1.1
+++ modules/file/tests/file_module_test.module	10 Sep 2009 03:36:29 -0000
@@ -22,7 +22,7 @@ function file_module_test_menu() {
   return $items;
 }
 
-function file_module_test_form($form_state) {
+function file_module_test_form(&$form, $form_state) {
   $form = array(
     '#tree' => TRUE,
   );
Index: modules/filter/filter.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.admin.inc,v
retrieving revision 1.43
diff -u -p -r1.43 filter.admin.inc
--- modules/filter/filter.admin.inc	5 Sep 2009 13:22:13 -0000	1.43
+++ modules/filter/filter.admin.inc	10 Sep 2009 03:36:29 -0000
@@ -111,7 +111,7 @@ function filter_admin_format_page($forma
  * @see filter_admin_format_form_validate()
  * @see filter_admin_format_form_submit()
  */
-function filter_admin_format_form(&$form_state, $format) {
+function filter_admin_format_form(&$form, &$form_state, $format) {
   $default = ($format->format == variable_get('filter_default_format', 1));
   if ($default) {
     $help = t('All roles for the default format must be enabled and cannot be changed.');
@@ -218,7 +218,7 @@ function filter_admin_format_form_submit
  * @ingroup forms
  * @see filter_admin_delete_submit()
  */
-function filter_admin_delete(&$form_state, $format) {
+function filter_admin_delete(&$form, &$form_state, $format) {
   if ($format) {
     if ($format->format != variable_get('filter_default_format', 1)) {
       $form['#format'] = $format;
@@ -268,7 +268,7 @@ function filter_admin_configure_page($fo
  *
  * @ingroup forms
  */
-function filter_admin_configure(&$form_state, $format) {
+function filter_admin_configure(&$form, &$form_state, $format) {
   $filters = filter_list_format($format->format);
   $filter_info = filter_get_filters();
 
@@ -338,7 +338,7 @@ function filter_admin_order_page($format
  * @see theme_filter_admin_order()
  * @see filter_admin_order_submit()
  */
-function filter_admin_order(&$form_state, $format = NULL) {
+function filter_admin_order(&$form, &$form_state, $format = NULL) {
   // Get list (with forced refresh).
   $filters = filter_list_format($format->format);
 
Index: modules/filter/filter.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.api.php,v
retrieving revision 1.13
diff -u -p -r1.13 filter.api.php
--- modules/filter/filter.api.php	27 Aug 2009 21:18:19 -0000	1.13
+++ modules/filter/filter.api.php	10 Sep 2009 03:36:29 -0000
@@ -91,7 +91,7 @@
  *   format.
  *
  * @code
- *   function mymodule_filter_settings(&$form_state, $filter, $defaults) {
+ *   function mymodule_filter_settings(&$form, &$form_state, $filter, $defaults) {
  *     $form['mymodule_url_length'] = array(
  *       '#type' => 'textfield',
  *       '#title' => t('Maximum link text length'),
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.287
diff -u -p -r1.287 filter.module
--- modules/filter/filter.module	30 Aug 2009 06:04:09 -0000	1.287
+++ modules/filter/filter.module	10 Sep 2009 03:36:29 -0000
@@ -809,7 +809,7 @@ function filter_filter_info() {
 /**
  * Settings callback for the HTML filter.
  */
-function _filter_html_settings(&$form_state, $filter, $defaults) {
+function _filter_html_settings(&$form, &$form_state, $filter, $defaults) {
   $form['allowed_html'] = array(
     '#type' => 'textfield',
     '#title' => t('Allowed HTML tags'),
@@ -855,7 +855,7 @@ function _filter_html($text, $filter) {
 /**
  * Settings callback for URL filter.
  */
-function _filter_url_settings(&$form_state, $filter, $defaults) {
+function _filter_url_settings(&$form, &$form_state, $filter, $defaults) {
   $form['filter_url_length'] = array(
     '#type' => 'textfield',
     '#title' => t('Maximum link text length'),
Index: modules/forum/forum.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.admin.inc,v
retrieving revision 1.24
diff -u -p -r1.24 forum.admin.inc
--- modules/forum/forum.admin.inc	30 Jul 2009 19:24:21 -0000	1.24
+++ modules/forum/forum.admin.inc	10 Sep 2009 03:36:29 -0000
@@ -27,7 +27,7 @@ function forum_form_main($type, $edit = 
  * @ingroup forms
  * @see forum_form_submit()
  */
-function forum_form_forum(&$form_state, $edit = array()) {
+function forum_form_forum(&$form, &$form_state, $edit = array()) {
   $edit += array(
     'name' => '',
     'description' => '',
@@ -105,7 +105,7 @@ function forum_form_submit($form, &$form
  * @ingroup forms
  * @see forum_form_submit()
  */
-function forum_form_container(&$form_state, $edit = array()) {
+function forum_form_container(&$form, &$form_state, $edit = array()) {
   $edit += array(
     'name' => '',
     'description' => '',
@@ -160,7 +160,7 @@ function forum_form_container(&$form_sta
  *
  * @param $tid ID of the term to be deleted
  */
-function forum_confirm_delete(&$form_state, $tid) {
+function forum_confirm_delete(&$form, &$form_state, $tid) {
   $term = taxonomy_term_load($tid);
 
   $form['tid'] = array('#type' => 'value', '#value' => $tid);
@@ -215,7 +215,7 @@ function forum_admin_settings() {
 /**
  * Returns an overview list of existing forums and containers
  */
-function forum_overview(&$form_state) {
+function forum_overview(&$form, &$form_state) {
   module_load_include('inc', 'taxonomy', 'taxonomy.admin');
 
   $vid = variable_get('forum_nav_vocabulary', '');
Index: modules/image/image.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/image/image.admin.inc,v
retrieving revision 1.10
diff -u -p -r1.10 image.admin.inc
--- modules/image/image.admin.inc	5 Sep 2009 15:05:02 -0000	1.10
+++ modules/image/image.admin.inc	10 Sep 2009 03:36:30 -0000
@@ -35,7 +35,7 @@ function image_style_list() {
  * @see image_style_form_submit()
  * @see image_style_name_validate()
  */
-function image_style_form(&$form_state, $style) {
+function image_style_form(&$form, &$form_state, $style) {
   $title = t('Edit %name style', array('%name' => $style['name']));
   drupal_set_title($title, PASS_THROUGH);
 
@@ -187,7 +187,7 @@ function image_style_form_submit($form, 
  * @see image_style_add_form_submit()
  * @see image_style_name_validate()
  */
-function image_style_add_form(&$form_state) {
+function image_style_add_form(&$form, &$form_state) {
   $form = array();
 
   $form['name'] = array(
@@ -243,7 +243,7 @@ function image_style_name_validate($elem
  * @ingroup forms
  * @see image_style_delete_form_submit()
  */
-function image_style_delete_form($form_state, $style) {
+function image_style_delete_form(&$form, $form_state, $style) {
   $form_state['image_style'] = $style;
   $form = array();
 
@@ -298,7 +298,7 @@ function image_style_delete_form_submit(
  * @see image_crop_form()
  * @see image_effect_form_submit()
  */
-function image_effect_form(&$form_state, $style, $effect) {
+function image_effect_form(&$form, &$form_state, $style, $effect) {
   if (!empty($effect['data'])) {
     $title = t('Edit %label effect', array('%label' => $effect['label']));
   }
@@ -365,7 +365,7 @@ function image_effect_form_submit($form,
  * @ingroup forms
  * @see image_effect_delete_form_submit()
  */
-function image_effect_delete_form(&$form_state, $style, $effect) {
+function image_effect_delete_form(&$form, &$form_state, $style, $effect) {
   $form_state['image_style'] = $style;
   $form_state['image_effect'] = $effect;
 
Index: modules/menu/menu.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.admin.inc,v
retrieving revision 1.57
diff -u -p -r1.57 menu.admin.inc
--- modules/menu/menu.admin.inc	5 Sep 2009 15:05:03 -0000	1.57
+++ modules/menu/menu.admin.inc	10 Sep 2009 03:36:30 -0000
@@ -40,7 +40,7 @@ function theme_menu_admin_overview($titl
  * Shows for one menu the menu links accessible to the current user and
  * relevant operations.
  */
-function menu_overview_form(&$form_state, $menu) {
+function menu_overview_form(&$form, &$form_state, $menu) {
   global $menu_admin;
   $sql = "
     SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, m.description, ml.*
@@ -243,7 +243,7 @@ function theme_menu_overview_form($form)
 /**
  * Menu callback; Build the menu link editing form.
  */
-function menu_edit_item(&$form_state, $type, $item, $menu) {
+function menu_edit_item(&$form, &$form_state, $type, $item, $menu) {
 
   $form['menu'] = array(
     '#type' => 'fieldset',
@@ -404,7 +404,7 @@ function menu_edit_item_submit($form, &$
 /**
  * Menu callback; Build the form that handles the adding/editing of a custom menu.
  */
-function menu_edit_menu(&$form_state, $type, $menu = array()) {
+function menu_edit_menu(&$form, &$form_state, $type, $menu = array()) {
   $system_menus = menu_list_system_menus();
   $menu += array('menu_name' => '', 'title' => '', 'description' => '');
 
@@ -497,7 +497,7 @@ function menu_delete_menu_page($menu) {
 /**
  * Build a confirm form for deletion of a custom menu.
  */
-function menu_delete_menu_confirm(&$form_state, $menu) {
+function menu_delete_menu_confirm(&$form, &$form_state, $menu) {
   $form['#menu'] = $menu;
   $caption = '';
   $num_links = db_query("SELECT COUNT(*) FROM {menu_links} WHERE menu_name = :menu", array(':menu' => $menu['menu_name']))->fetchField();
@@ -639,7 +639,7 @@ function menu_item_delete_page($item) {
 /**
  * Build a confirm form for deletion of a single menu link.
  */
-function menu_item_delete_form(&$form_state, $item) {
+function menu_item_delete_form(&$form, &$form_state, $item) {
   $form['#item'] = $item;
   return confirm_form($form, t('Are you sure you want to delete the custom menu link %item?', array('%item' => $item['link_title'])), 'admin/structure/menu-customize/' . $item['menu_name']);
 }
@@ -659,7 +659,7 @@ function menu_item_delete_form_submit($f
 /**
  * Menu callback; reset a single modified menu link.
  */
-function menu_reset_item_confirm(&$form_state, $item) {
+function menu_reset_item_confirm(&$form, &$form_state, $item) {
   $form['item'] = array('#type' => 'value', '#value' => $item);
   return confirm_form($form, t('Are you sure you want to reset the link %item to its default values?', array('%item' => $item['link_title'])), 'admin/structure/menu-customize/' . $item['menu_name'], t('Any customizations will be lost. This action cannot be undone.'), t('Reset'));
 }
Index: modules/node/content_types.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v
retrieving revision 1.92
diff -u -p -r1.92 content_types.inc
--- modules/node/content_types.inc	5 Sep 2009 15:05:03 -0000	1.92
+++ modules/node/content_types.inc	10 Sep 2009 03:36:30 -0000
@@ -57,7 +57,7 @@ function theme_node_admin_overview($name
 /**
  * Generates the node type editing form.
  */
-function node_type_form(&$form_state, $type = NULL) {
+function node_type_form(&$form, &$form_state, $type = NULL) {
   if (!isset($type->type)) {
     // This is a new type. Node module managed types are custom and unlocked.
     $type = node_type_set_defaults(array('custom' => 1, 'locked' => 0));
@@ -414,7 +414,7 @@ function node_type_reset($type) {
 /**
  * Menu callback; delete a single content type.
  */
-function node_type_delete_confirm(&$form_state, $type) {
+function node_type_delete_confirm(&$form, &$form_state, $type) {
   $form['type'] = array('#type' => 'value', '#value' => $type->type);
   $form['name'] = array('#type' => 'value', '#value' => $type->name);
 
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.65
diff -u -p -r1.65 node.admin.inc
--- modules/node/node.admin.inc	5 Sep 2009 06:53:01 -0000	1.65
+++ modules/node/node.admin.inc	10 Sep 2009 03:36:30 -0000
@@ -366,7 +366,7 @@ function _node_mass_update_batch_finishe
 /**
  * Menu callback: content administration.
  */
-function node_admin_content($form_state) {
+function node_admin_content(&$form, $form_state) {
   if (isset($form_state['values']['operation']) && $form_state['values']['operation'] == 'delete') {
     return node_multiple_delete_confirm($form_state, array_filter($form_state['values']['nodes']));
   }
@@ -555,7 +555,7 @@ function theme_node_admin_nodes($form) {
   return $output;
 }
 
-function node_multiple_delete_confirm(&$form_state, $nodes) {
+function node_multiple_delete_confirm(&$form, &$form_state, $nodes) {
   $form['nodes'] = array('#prefix' => '<ul>', '#suffix' => '</ul>', '#tree' => TRUE);
   // array_filter returns only elements with TRUE values
   foreach ($nodes as $nid => $value) {
Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.79
diff -u -p -r1.79 node.pages.inc
--- modules/node/node.pages.inc	5 Sep 2009 15:05:03 -0000	1.79
+++ modules/node/node.pages.inc	10 Sep 2009 03:36:30 -0000
@@ -107,7 +107,7 @@ function node_object_prepare($node) {
 /**
  * Generate the node add/edit form array.
  */
-function node_form(&$form_state, $node) {
+function node_form(&$form, &$form_state, $node) {
   global $user;
 
   if (isset($form_state['node'])) {
@@ -453,7 +453,7 @@ function node_form_submit_build_node($fo
 /**
  * Menu callback -- ask for confirmation of node deletion
  */
-function node_delete_confirm(&$form_state, $node) {
+function node_delete_confirm(&$form, &$form_state, $node) {
   $form['nid'] = array(
     '#type' => 'value',
     '#value' => $node->nid,
@@ -536,7 +536,7 @@ function node_revision_overview($node) {
 /**
  * Ask for confirmation of the reversion to prevent against CSRF attacks.
  */
-function node_revision_revert_confirm($form_state, $node_revision) {
+function node_revision_revert_confirm(&$form, $form_state, $node_revision) {
   $form['#node_revision'] = $node_revision;
   return confirm_form($form, t('Are you sure you want to revert to the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp))), 'node/' . $node_revision->nid . '/revisions', '', t('Revert'), t('Cancel'));
 }
@@ -556,7 +556,7 @@ function node_revision_revert_confirm_su
   $form_state['redirect'] = 'node/' . $node_revision->nid . '/revisions';
 }
 
-function node_revision_delete_confirm($form_state, $node_revision) {
+function node_revision_delete_confirm(&$form, $form_state, $node_revision) {
   $form['#node_revision'] = $node_revision;
   return confirm_form($form, t('Are you sure you want to delete the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp))), 'node/' . $node_revision->nid . '/revisions', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
 }
Index: modules/openid/openid.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.inc,v
retrieving revision 1.18
diff -u -p -r1.18 openid.inc
--- modules/openid/openid.inc	3 Jun 2009 19:27:21 -0000	1.18
+++ modules/openid/openid.inc	10 Sep 2009 03:36:30 -0000
@@ -84,7 +84,7 @@ function openid_redirect($url, $message)
   exit;
 }
 
-function openid_redirect_form(&$form_state, $url, $message) {
+function openid_redirect_form(&$form, &$form_state, $url, $message) {
   $form = array();
   $form['#action'] = $url;
   $form['#method'] = "post";
Index: modules/openid/openid.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.pages.inc,v
retrieving revision 1.19
diff -u -p -r1.19 openid.pages.inc
--- modules/openid/openid.pages.inc	29 Jul 2009 06:39:34 -0000	1.19
+++ modules/openid/openid.pages.inc	10 Sep 2009 03:36:30 -0000
@@ -92,7 +92,7 @@ function openid_user_add_validate($form,
 /**
  * Menu callback; Delete the specified OpenID identity from the system.
  */
-function openid_user_delete_form($form_state, $account, $aid = 0) {
+function openid_user_delete_form(&$form, $form_state, $account, $aid = 0) {
   $authname = db_query("SELECT authname FROM {authmap} WHERE uid = :uid AND aid = :aid AND module = 'openid'", array(
     ':uid' => $account->uid,
     ':aid' => $aid,
@@ -101,7 +101,7 @@ function openid_user_delete_form($form_s
   return confirm_form(array(), t('Are you sure you want to delete the OpenID %authname for %user?', array('%authname' => $authname, '%user' => $account->name)), 'user/' . $account->uid . '/openid');
 }
 
-function openid_user_delete_form_submit(&$form_state, $form_values) {
+function openid_user_delete_form_submit(&$form, &$form_state, $form_values) {
   $query = db_delete('authmap')
     ->condition('uid', $form_state['#args'][0]->uid)
     ->condition('aid', $form_state['#args'][1])
Index: modules/path/path.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v
retrieving revision 1.29
diff -u -p -r1.29 path.admin.inc
--- modules/path/path.admin.inc	28 Aug 2009 14:40:12 -0000	1.29
+++ modules/path/path.admin.inc	10 Sep 2009 03:36:30 -0000
@@ -98,7 +98,7 @@ function path_admin_edit($pid = 0) {
  * @see path_admin_form_validate()
  * @see path_admin_form_submit()
  */
-function path_admin_form(&$form_state, $edit = array('src' => '', 'dst' => '', 'language' => '', 'pid' => NULL)) {
+function path_admin_form(&$form, &$form_state, $edit = array('src' => '', 'dst' => '', 'language' => '', 'pid' => NULL)) {
 
   $form['#alias'] = $edit;
 
@@ -180,7 +180,7 @@ function path_admin_form_submit($form, &
 /**
  * Menu callback; confirms deleting an URL alias
  */
-function path_admin_delete_confirm($form_state, $pid) {
+function path_admin_delete_confirm(&$form, $form_state, $pid) {
   $path = path_load($pid);
   if (user_access('administer url aliases')) {
     $form['pid'] = array('#type' => 'value', '#value' => $pid);
@@ -209,7 +209,7 @@ function path_admin_delete_confirm_submi
  * @ingroup forms
  * @see path_admin_filter_form_submit()
  */
-function path_admin_filter_form(&$form_state, $keys = '') {
+function path_admin_filter_form(&$form, &$form_state, $keys = '') {
   $form['#attributes'] = array('class' => array('search-form'));
   $form['basic'] = array('#type' => 'fieldset',
     '#title' => t('Filter aliases')
Index: modules/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.311
diff -u -p -r1.311 poll.module
--- modules/poll/poll.module	29 Aug 2009 05:46:03 -0000	1.311
+++ modules/poll/poll.module	10 Sep 2009 03:36:30 -0000
@@ -628,7 +628,7 @@ function poll_teaser($node) {
  * @see poll_vote()
  * @see phptemplate_preprocess_poll_vote()
  */
-function poll_view_voting(&$form_state, $node, $block = FALSE) {
+function poll_view_voting(&$form, &$form_state, $node, $block = FALSE) {
   if ($node->choice) {
     $list = array();
     foreach ($node->choice as $i => $choice) {
@@ -837,7 +837,7 @@ function template_preprocess_poll_bar(&$
  * @ingroup forms
  * @see poll_cancel()
  */
-function poll_cancel_form(&$form_state, $nid) {
+function poll_cancel_form(&$form, &$form_state, $nid) {
   // Store the nid so we can get to it in submit functions.
   $form['#nid'] = $nid;
 
Index: modules/profile/profile.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.admin.inc,v
retrieving revision 1.29
diff -u -p -r1.29 profile.admin.inc
--- modules/profile/profile.admin.inc	22 Aug 2009 14:34:21 -0000	1.29
+++ modules/profile/profile.admin.inc	10 Sep 2009 03:36:30 -0000
@@ -170,7 +170,7 @@ function theme_profile_admin_overview($f
  * @see profile_field_form_validate()
  * @see profile_field_form_submit()
  */
-function profile_field_form(&$form_state, $arg = NULL) {
+function profile_field_form(&$form, &$form_state, $arg = NULL) {
   if (arg(4) == 'edit') {
     if (is_numeric($arg)) {
       $fid = $arg;
@@ -380,7 +380,7 @@ function profile_field_form_submit($form
 /**
  * Menu callback; deletes a field from all user profiles.
  */
-function profile_field_delete(&$form_state, $fid) {
+function profile_field_delete(&$form, &$form_state, $fid) {
   $field = db_query("SELECT title FROM {profile_field} WHERE fid = :fid", array(':fid' => $fid))->fetchObject();
   if (!$field) {
     drupal_not_found();
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.314
diff -u -p -r1.314 search.module
--- modules/search/search.module	5 Sep 2009 10:53:09 -0000	1.314
+++ modules/search/search.module	10 Sep 2009 03:36:30 -0000
@@ -864,7 +864,7 @@ function search_get_keys() {
  * @return
  *   An HTML string containing the search form.
  */
-function search_form(&$form_state, $action = '', $keys = '', $type = NULL, $prompt = NULL) {
+function search_form(&$form, &$form_state, $action = '', $keys = '', $type = NULL, $prompt = NULL) {
 
   // Add CSS
   drupal_add_css(drupal_get_path('module', 'search') . '/search.css', array('preprocess' => FALSE));
@@ -906,7 +906,7 @@ function search_form(&$form_state, $acti
  * @see search-theme-form.tpl.php
  * @see search-block-form.tpl.php
  */
-function search_box(&$form_state, $form_id) {
+function search_box(&$form, &$form_state, $form_id) {
   $form[$form_id] = array(
     '#title' => t('Search this site'),
     '#type' => 'textfield',
Index: modules/simpletest/simpletest.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.pages.inc,v
retrieving revision 1.15
diff -u -p -r1.15 simpletest.pages.inc
--- modules/simpletest/simpletest.pages.inc	22 Aug 2009 14:34:21 -0000	1.15
+++ modules/simpletest/simpletest.pages.inc	10 Sep 2009 03:36:30 -0000
@@ -196,7 +196,7 @@ function simpletest_test_form_submit($fo
 /**
  * Test results form for $test_id.
  */
-function simpletest_result_form(&$form_state, $test_id) {
+function simpletest_result_form(&$form, &$form_state, $test_id) {
   $form = array();
 
   // Make sure there are test results to display and a re-run is not being performed.
@@ -417,7 +417,7 @@ function simpletest_result_status_image(
 /**
  * Provides settings form for SimpleTest variables.
  */
-function simpletest_settings_form(&$form_state) {
+function simpletest_settings_form(&$form, &$form_state) {
   $form = array();
 
   $form['general'] = array(
Index: modules/simpletest/tests/browser_test.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/browser_test.module,v
retrieving revision 1.1
diff -u -p -r1.1 browser_test.module
--- modules/simpletest/tests/browser_test.module	17 Aug 2009 06:08:47 -0000	1.1
+++ modules/simpletest/tests/browser_test.module	10 Sep 2009 03:36:30 -0000
@@ -39,7 +39,7 @@ function browser_test_print_get() {
   exit;
 }
 
-function browser_test_print_post_form(&$form_state) {
+function browser_test_print_post_form(&$form, &$form_state) {
   $form = array();
 
   $form['foo'] = array(
Index: modules/simpletest/tests/field_test.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/field_test.module,v
retrieving revision 1.21
diff -u -p -r1.21 field_test.module
--- modules/simpletest/tests/field_test.module	31 Aug 2009 05:35:47 -0000	1.21
+++ modules/simpletest/tests/field_test.module	10 Sep 2009 03:36:30 -0000
@@ -256,7 +256,7 @@ function field_test_entity_edit($entity)
 /**
  * Form to set the value of fields attached to our entity.
  */
-function field_test_entity_form(&$form_state, $entity) {
+function field_test_entity_form(&$form, &$form_state, $entity) {
   $form = array();
 
   if (isset($form_state['test_entity'])) {
Index: modules/simpletest/tests/file_test.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/file_test.module,v
retrieving revision 1.15
diff -u -p -r1.15 file_test.module
--- modules/simpletest/tests/file_test.module	31 Aug 2009 05:47:34 -0000	1.15
+++ modules/simpletest/tests/file_test.module	10 Sep 2009 03:36:30 -0000
@@ -44,7 +44,7 @@ function file_test_stream_wrappers() {
 /**
  * Form to test file uploads.
  */
-function _file_test_form(&$form_state) {
+function _file_test_form(&$form, &$form_state) {
   $form['file_test_upload'] = array(
     '#type' => 'file',
     '#title' => t('Upload an image'),
Index: modules/simpletest/tests/form_test.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/form_test.module,v
retrieving revision 1.8
diff -u -p -r1.8 form_test.module
--- modules/simpletest/tests/form_test.module	17 Aug 2009 07:12:16 -0000	1.8
+++ modules/simpletest/tests/form_test.module	10 Sep 2009 03:36:30 -0000
@@ -82,7 +82,7 @@ function form_test_form_clean_id_page() 
 /**
  * A simple form to test clean_id generation.
  */
-function form_test_test_form(&$form_state) {
+function form_test_test_form(&$form, &$form_state) {
   $form['input'] = array(
     '#type' => 'item',
     '#title' => 'Test Textfield',
@@ -137,7 +137,7 @@ function _form_test_tableselect_get_data
  * @return
  *   A form with a tableselect element and a submit button.
  */
-function _form_test_tableselect_form_builder($form_state, $element_properties) {
+function _form_test_tableselect_form_builder(&$form, $form_state, $element_properties) {
   $form = array();
 
   list($header, $options) = _form_test_tableselect_get_data();
@@ -163,7 +163,7 @@ function _form_test_tableselect_form_bui
 /**
  * Test the tableselect #multiple = TRUE functionality.
  */
-function _form_test_tableselect_multiple_true_form($form_state) {
+function _form_test_tableselect_multiple_true_form(&$form, $form_state) {
   return _form_test_tableselect_form_builder($form_state, array('#multiple' => TRUE));
 }
 
@@ -180,7 +180,7 @@ function _form_test_tableselect_multiple
 /**
  * Test the tableselect #multiple = FALSE functionality.
  */
-function _form_test_tableselect_multiple_false_form($form_state) {
+function _form_test_tableselect_multiple_false_form(&$form, $form_state) {
   return _form_test_tableselect_form_builder($form_state, array('#multiple' => FALSE));
 }
 
@@ -194,14 +194,14 @@ function _form_test_tableselect_multiple
 /**
  * Test functionality of the tableselect #empty property.
  */
-function _form_test_tableselect_empty_form($form_state) {
+function _form_test_tableselect_empty_form(&$form, $form_state) {
   return _form_test_tableselect_form_builder($form_state, array('#options' => array()));
 }
 
 /**
  * Test functionality of the tableselect #js_select property.
  */
-function _form_test_tableselect_js_select_form($form_state, $action) {
+function _form_test_tableselect_js_select_form(&$form, $form_state, $action) {
 
   switch ($action) {
 
@@ -263,7 +263,7 @@ function form_test_batch_callback($value
 /**
  * A simple form with a textfield and submit button.
  */
-function form_test_mock_form($form_state) {
+function form_test_mock_form(&$form, $form_state) {
   $form = array();
 
   $form['test_value'] = array(
@@ -298,7 +298,7 @@ function form_test_mock_form_submit($for
  *
  * @see form_storage_test_form_submit().
  */
-function form_storage_test_form(&$form_state) {
+function form_storage_test_form(&$form, &$form_state) {
   // Initialize
   if (!isset($form_state['storage'])) {
     if (empty($form_state['input'])) {
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.197
diff -u -p -r1.197 system.admin.inc
--- modules/system/system.admin.inc	26 Aug 2009 10:53:45 -0000	1.197
+++ modules/system/system.admin.inc	10 Sep 2009 03:36:30 -0000
@@ -378,7 +378,7 @@ function system_themes_form_submit($form
  * @ingroup forms
  * @see system_theme_settings_submit()
  */
-function system_theme_settings(&$form_state, $key = '') {
+function system_theme_settings(&$form, &$form_state, $key = '') {
   $directory_path = file_directory_path();
   if (!file_prepare_directory($directory_path, FILE_CREATE_DIRECTORY)) {
     drupal_set_message(t('The directory %directory does not exist or is not writable.', array('%directory' => $directory_path)), 'warning');
@@ -633,7 +633,7 @@ function _system_is_incompatible(&$incom
  * @return
  *   The form array.
  */
-function system_modules($form_state = array()) {
+function system_modules(&$form, $form_state = array()) {
   // Get current list of modules.
   $files = system_get_module_data();
 
@@ -1033,7 +1033,7 @@ function system_modules_submit($form, &$
  * @return
  *   A form array representing the currently disabled modules.
  */
-function system_modules_uninstall($form_state = NULL) {
+function system_modules_uninstall(&$form, $form_state = NULL) {
   // Make sure the install API is available.
   include_once DRUPAL_ROOT . '/includes/install.inc';
 
@@ -1185,7 +1185,7 @@ function system_ip_blocking() {
  * @see system_ip_blocking_form_validate()
  * @see system_ip_blocking_form_submit()
  */
-function system_ip_blocking_form($form_state) {
+function system_ip_blocking_form(&$form, $form_state) {
   $form['ip'] = array(
     '#title' => t('IP address'),
     '#type' => 'textfield',
@@ -1231,7 +1231,7 @@ function system_ip_blocking_form_submit(
  *
  * @see system_ip_blocking_delete_submit()
  */
-function system_ip_blocking_delete(&$form_state, $iid) {
+function system_ip_blocking_delete(&$form, &$form_state, $iid) {
   $form['blocked_ip'] = array(
     '#type' => 'value',
     '#value' => $iid,
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.785
diff -u -p -r1.785 system.module
--- modules/system/system.module	5 Sep 2009 15:05:04 -0000	1.785
+++ modules/system/system.module	10 Sep 2009 03:36:30 -0000
@@ -2571,7 +2571,7 @@ function system_actions_manage() {
  * @return
  *   Form definition.
  */
-function system_actions_manage_form($form_state, $options = array()) {
+function system_actions_manage_form(&$form, $form_state, $options = array()) {
   $form['parent'] = array(
     '#type' => 'fieldset',
     '#title' => t('Make a new advanced action available'),
@@ -2617,7 +2617,7 @@ function system_actions_manage_form_subm
  * @return
  *   Form definition.
  */
-function system_actions_configure($form_state, $action = NULL) {
+function system_actions_configure(&$form, $form_state, $action = NULL) {
   if ($action === NULL) {
     drupal_goto('admin/config/system/actions');
   }
@@ -2690,7 +2690,7 @@ function system_actions_configure($form_
  * Validate system_actions_configure form submissions.
  */
 function system_actions_configure_validate($form, $form_state) {
-  $function = actions_function_lookup($form_state['values']['actions_action']) . '_validate';
+  $function = actions_function_lookup(&$form, $form_state['values']['actions_action']) . '_validate';
   // Hand off validation to the action.
   if (function_exists($function)) {
     $function($form, $form_state);
@@ -2701,7 +2701,7 @@ function system_actions_configure_valida
  * Process system_actions_configure form submissions.
  */
 function system_actions_configure_submit($form, &$form_state) {
-  $function = actions_function_lookup($form_state['values']['actions_action']);
+  $function = actions_function_lookup(&$form, $form_state['values']['actions_action']);
   $submit_function = $function . '_submit';
 
   // Action will return keyed array of values to store.
@@ -2720,7 +2720,7 @@ function system_actions_configure_submit
  * @ingroup forms
  * @see system_actions_delete_form_submit()
  */
-function system_actions_delete_form($form_state, $action) {
+function system_actions_delete_form(&$form, $form_state, $action) {
 
   $form['aid'] = array(
     '#type' => 'hidden',
Index: modules/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.68
diff -u -p -r1.68 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	5 Sep 2009 15:05:04 -0000	1.68
+++ modules/taxonomy/taxonomy.admin.inc	10 Sep 2009 03:36:30 -0000
@@ -102,7 +102,7 @@ function theme_taxonomy_overview_vocabul
  * @ingroup forms
  * @see taxonomy_form_vocabulary_submit()
  */
-function taxonomy_form_vocabulary(&$form_state, $edit = array()) {
+function taxonomy_form_vocabulary(&$form, &$form_state, $edit = array()) {
   if (!is_array($edit)) {
     $edit = (array)$edit;
   }
@@ -278,7 +278,7 @@ function taxonomy_form_vocabulary_submit
  * @see taxonomy_overview_terms_submit()
  * @see theme_taxonomy_overview_terms()
  */
-function taxonomy_overview_terms(&$form_state, $vocabulary) {
+function taxonomy_overview_terms(&$form, &$form_state, $vocabulary) {
   global $pager_page_array, $pager_total, $pager_total_items;
 
   // Check for confirmation forms.
@@ -677,7 +677,7 @@ function theme_taxonomy_overview_terms($
  * @ingroup forms
  * @see taxonomy_form_term_submit()
  */
-function taxonomy_form_term(&$form_state, $vocabulary, $edit = array()) {
+function taxonomy_form_term(&$form, &$form_state, $vocabulary, $edit = array()) {
   $edit += array(
     'name' => '',
     'description' => '',
@@ -885,7 +885,7 @@ function taxonomy_form_term_submit_build
  * @ingroup forms
  * @see taxonomy_form_term()
  */
-function taxonomy_term_confirm_parents(&$form_state, $vocabulary) {
+function taxonomy_term_confirm_parents(&$form, &$form_state, $vocabulary) {
   $form = array();
   foreach (element_children($form_state['values']) as $key) {
     $form[$key] = array(
@@ -905,7 +905,7 @@ function taxonomy_term_confirm_parents(&
  * @ingroup forms
  * @see taxonomy_term_confirm_delete_submit()
  */
-function taxonomy_term_confirm_delete(&$form_state, $tid) {
+function taxonomy_term_confirm_delete(&$form, &$form_state, $tid) {
   $term = taxonomy_term_load($tid);
 
   $form['type'] = array('#type' => 'value', '#value' => 'term');
@@ -942,7 +942,7 @@ function taxonomy_term_confirm_delete_su
  * @ingroup forms
  * @see taxonomy_vocabulary_confirm_delete_submit()
  */
-function taxonomy_vocabulary_confirm_delete(&$form_state, $vid) {
+function taxonomy_vocabulary_confirm_delete(&$form, &$form_state, $vid) {
   $vocabulary = taxonomy_vocabulary_load($vid);
 
   $form['#id'] = 'taxonomy_vocabulary_confirm_delete';
@@ -978,7 +978,7 @@ function taxonomy_vocabulary_confirm_del
  * @ingroup forms
  * @see taxonomy_vocabulary_confirm_reset_alphabetical_submit()
  */
-function taxonomy_vocabulary_confirm_reset_alphabetical(&$form_state, $vid) {
+function taxonomy_vocabulary_confirm_reset_alphabetical(&$form, &$form_state, $vid) {
   $vocabulary = taxonomy_vocabulary_load($vid);
 
   $form['type'] = array('#type' => 'value', '#value' => 'vocabulary');
Index: modules/trigger/trigger.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.admin.inc,v
retrieving revision 1.16
diff -u -p -r1.16 trigger.admin.inc
--- modules/trigger/trigger.admin.inc	1 Sep 2009 16:50:12 -0000	1.16
+++ modules/trigger/trigger.admin.inc	10 Sep 2009 03:36:30 -0000
@@ -46,7 +46,7 @@ function trigger_assign($type = NULL) {
  * @ingroup forms
  * @see trigger_unassign_submit()
  */
-function trigger_unassign($form_state, $hook = NULL, $op = NULL, $aid = NULL) {
+function trigger_unassign(&$form, $form_state, $hook = NULL, $op = NULL, $aid = NULL) {
   if (!($hook && $op && $aid)) {
     drupal_goto('admin/structure/trigger/assign');
   }
@@ -114,7 +114,7 @@ function trigger_unassign_submit($form, 
  * @see trigger_assign_form_validate()
  * @see trigger_assign_form_submit()
  */
-function trigger_assign_form($form_state, $hook, $op, $description) {
+function trigger_assign_form(&$form, $form_state, $hook, $op, $description) {
   $form['hook'] = array(
     '#type' => 'hidden',
     '#value' => $hook,
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.77
diff -u -p -r1.77 user.admin.inc
--- modules/user/user.admin.inc	5 Sep 2009 15:05:05 -0000	1.77
+++ modules/user/user.admin.inc	10 Sep 2009 03:36:30 -0000
@@ -602,7 +602,7 @@ function user_admin_settings() {
  * @see user_admin_permissions_submit()
  * @see theme_user_admin_permissions()
  */
-function user_admin_permissions($form_state, $rid = NULL) {
+function user_admin_permissions(&$form, $form_state, $rid = NULL) {
 
   // Retrieve role names for columns.
   $role_names = user_roles();
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1040
diff -u -p -r1.1040 user.module
--- modules/user/user.module	9 Sep 2009 11:27:00 -0000	1.1040
+++ modules/user/user.module	10 Sep 2009 03:36:30 -0000
@@ -1563,7 +1563,7 @@ function user_set_authmaps($account, $au
  *
  * @ingroup forms
  */
-function user_login(&$form_state) {
+function user_login(&$form, &$form_state) {
   global $user;
 
   // If we are already logged on, go to the user page instead.
@@ -1830,7 +1830,7 @@ function user_pass_rehash($password, $ti
   return md5($timestamp . $password . $login);
 }
 
-function user_edit_form(&$form_state, $uid, $edit, $register = FALSE) {
+function user_edit_form(&$form, &$form_state, $uid, $edit, $register = FALSE) {
   _user_password_dynamic_validation();
   $admin = user_access('administer users');
 
@@ -2326,7 +2326,7 @@ function user_role_set_permissions($role
 /**
  * Implement hook_user_operations().
  */
-function user_user_operations($form_state = array()) {
+function user_user_operations(&$form, $form_state = array()) {
   $operations = array(
     'unblock' => array(
       'label' => t('Unblock the selected users'),
@@ -2450,7 +2450,7 @@ function user_multiple_role_edit($accoun
   }
 }
 
-function user_multiple_cancel_confirm(&$form_state) {
+function user_multiple_cancel_confirm(&$form, &$form_state) {
   $edit = $form_state['input'];
 
   $form['accounts'] = array('#prefix' => '<ul>', '#suffix' => '</ul>', '#tree' => TRUE);
Index: modules/user/user.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v
retrieving revision 1.50
diff -u -p -r1.50 user.pages.inc
--- modules/user/user.pages.inc	31 Aug 2009 18:18:44 -0000	1.50
+++ modules/user/user.pages.inc	10 Sep 2009 03:36:30 -0000
@@ -75,7 +75,7 @@ function user_pass_submit($form, &$form_
 /**
  * Menu callback; process one time login link and redirects to the user page on success.
  */
-function user_pass_reset(&$form_state, $uid, $timestamp, $hashed_pass, $action = NULL) {
+function user_pass_reset(&$form, &$form_state, $uid, $timestamp, $hashed_pass, $action = NULL) {
   global $user;
 
   // When processing the one-time login link, we have to make sure that a user
@@ -255,7 +255,7 @@ function user_edit($account, $category =
  * @see user_profile_form_submit()
  * @see user_cancel_confirm_form_submit()
  */
-function user_profile_form($form_state, $account, $category = 'account') {
+function user_profile_form(&$form, $form_state, $account, $category = 'account') {
   global $user;
 
   $edit = (empty($form_state['values'])) ? (array)$account : $form_state['values'];
@@ -336,7 +336,7 @@ function user_edit_cancel_submit($form, 
  * @ingroup forms
  * @see user_edit_cancel_submit()
  */
-function user_cancel_confirm_form(&$form_state, $account) {
+function user_cancel_confirm_form(&$form, &$form_state, $account) {
   global $user;
 
   $form['_account'] = array('#type' => 'value', '#value' => $account);
