From 26bd449860f6baa77ec23349b89ad8a41860eda2 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 2 Dec 2005 15:21:01 +0000 Subject: - Patch #39576 by chx: rename '_execute' to '_submit' and '#execute' to '#submit'. --- includes/form.inc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'includes/form.inc') diff --git a/includes/form.inc b/includes/form.inc index 7e8e387af..3f845d38a 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -41,7 +41,7 @@ function element_children($element) { * Processes a form array, and produces the HTML output of a form. * If there is input in the $_POST['edit'] variable, this function * will attempt to validate it, using drupal_validate_form, - * and then execute the form using drupal_execute_form. + * and then submit the form using drupal_submit_form. * * @param $form_id * A unique string identifying the form. Allows each form to be themed. @@ -79,12 +79,12 @@ function drupal_get_form($form_id, &$form, $callback = NULL) { } } - if (!isset($form['#execute'])) { - if (function_exists($form_id .'_execute')) { - $form['#execute'] = array($form_id .'_execute'); + if (!isset($form['#submit'])) { + if (function_exists($form_id .'_submit')) { + $form['#submit'] = array($form_id .'_submit'); } - elseif (function_exists($callback .'_execute')) { - $form['#execute'] = array($callback .'_execute'); + elseif (function_exists($callback .'_submit')) { + $form['#submit'] = array($callback .'_submit'); } } @@ -98,7 +98,7 @@ function drupal_get_form($form_id, &$form, $callback = NULL) { 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()) { - drupal_execute_form($form_id, $form, $callback); + drupal_submit_form($form_id, $form, $callback); } } @@ -136,11 +136,11 @@ function drupal_validate_form($form_id, &$form, $callback = NULL) { } } -function drupal_execute_form($form_id, $form, $callback = NULL) { +function drupal_submit_form($form_id, $form, $callback = NULL) { global $form_values; - if (isset($form['#execute'])) { - foreach ($form['#execute'] as $key => $function) { + if (isset($form['#submit'])) { + foreach ($form['#submit'] as $key => $function) { if (isset($form['#execution_arguments'][$key])) { $function_args = array_merge(array($form_id, $form_values), $form['#execution_arguments'][$key]); call_user_func_array($function, $function_args); -- cgit v1.2.3