summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-04-06 15:30:19 +0000
committerGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-04-06 15:30:19 +0000
commitc3cb1ea435b34ab1ef6b074774528a5226b5e884 (patch)
tree3b570f0f1d5c0a045d8e593494fc7f2026a327fd /includes
parentcfe001af7a26926f02672275dcd516841fc1b985 (diff)
downloadbrdo-c3cb1ea435b34ab1ef6b074774528a5226b5e884.tar.gz
brdo-c3cb1ea435b34ab1ef6b074774528a5226b5e884.tar.bz2
#56921, revert earlier patches, patch by chx
Diffstat (limited to 'includes')
-rw-r--r--includes/form.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 61563169d..c0b61b661 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -111,8 +111,7 @@ function drupal_get_form($form_id, &$form, $callback = NULL) {
$function($form_id, $form);
}
- form_builder($form_id, $form);
-
+ $form = form_builder($form_id, $form);
if (!empty($_POST['edit']) && (($_POST['edit']['form_id'] == $form_id) || ($_POST['edit']['form_id'] == $callback))) {
drupal_validate_form($form_id, $form, $callback);
if ($form_submitted && !form_get_errors()) {
@@ -308,9 +307,10 @@ function form_error(&$element, $message = '') {
* @param $form
* An associative array containing the structure of the form.
*/
-function form_builder($form_id, &$form) {
+function form_builder($form_id, $form) {
global $form_values;
global $form_submitted;
+
/* Use element defaults */
if ((!empty($form['#type'])) && ($info = _element_info($form['#type']))) {
// overlay $info onto $form, retaining preexisting keys in $form
@@ -417,7 +417,7 @@ function form_builder($form_id, &$form) {
if (!isset($form[$key]['#weight'])) {
$form[$key]['#weight'] = $count/1000;
}
- form_builder($form_id, $form[$key]);
+ $form[$key] = form_builder($form_id, $form[$key]);
$count++;
}
@@ -426,6 +426,8 @@ function form_builder($form_id, &$form) {
$form = $function($form, $form_values);
$form['#after_build_done'] = TRUE;
}
+
+ return $form;
}
/**