Commit 674b933c authored by Dries's avatar Dries

- Patch #245001 by kkaefer et al: unify #process callback naming.

parent fb3b6d13
......@@ -1574,7 +1574,7 @@ function theme_password_confirm($element) {
/**
* Expand a password_confirm field into two text boxes.
*/
function expand_password_confirm($element) {
function form_process_password_confirm($element) {
$element['pass1'] = array(
'#type' => 'password',
'#title' => t('Password'),
......@@ -1642,7 +1642,7 @@ function theme_date($element) {
/**
* Roll out a single date element.
*/
function expand_date($element) {
function form_process_date($element) {
// Default to current date
if (empty($element['#value'])) {
$element['#value'] = array('day' => format_date(time(), 'custom', 'j'),
......@@ -1719,7 +1719,7 @@ function weight_value(&$form) {
* Roll out a single radios element to a list of radios,
* using the options array as index.
*/
function expand_radios($element) {
function form_process_radios($element) {
if (count($element['#options']) > 0) {
foreach ($element['#options'] as $key => $choice) {
if (!isset($element[$key])) {
......@@ -1755,7 +1755,7 @@ function expand_radios($element) {
* None. Additional code is added to the header of the page using
* drupal_add_js.
*/
function form_expand_ahah($element) {
function form_process_ahah($element) {
static $js_added = array();
// Add a reasonable default event handler if none specified.
if (isset($element['#ahah']['path']) && !isset($element['#ahah']['event'])) {
......@@ -1893,7 +1893,7 @@ function theme_checkboxes($element) {
}
}
function expand_checkboxes($element) {
function form_process_checkboxes($element) {
$value = is_array($element['#value']) ? $element['#value'] : array();
$element['#tree'] = TRUE;
if (count($element['#options']) > 0) {
......@@ -2111,7 +2111,7 @@ function theme_password($element) {
/**
* Expand weight elements into selects.
*/
function process_weight($element) {
function form_process_weight($element) {
for ($n = (-1 * $element['#delta']); $n <= $element['#delta']; $n++) {
$weights[$n] = $n;
}
......
......@@ -734,7 +734,7 @@ function system_modules($form_state = array()) {
'#default_value' => $status,
'#options' => $options,
'#process' => array(
'expand_checkboxes',
'form_process_checkboxes',
'system_modules_disable',
),
'#disabled_modules' => $disabled,
......
......@@ -189,7 +189,7 @@ function system_elements() {
'#name' => 'op',
'#button_type' => 'submit',
'#executes_submit_callback' => TRUE,
'#process' => array('form_expand_ahah'),
'#process' => array('form_process_ahah'),
);
$type['button'] = array(
......@@ -197,14 +197,14 @@ function system_elements() {
'#name' => 'op',
'#button_type' => 'submit',
'#executes_submit_callback' => FALSE,
'#process' => array('form_expand_ahah'),
'#process' => array('form_process_ahah'),
);
$type['image_button'] = array(
'#input' => TRUE,
'#button_type' => 'submit',
'#executes_submit_callback' => TRUE,
'#process' => array('form_expand_ahah'),
'#process' => array('form_process_ahah'),
'#return_value' => TRUE,
'#has_garbage_value' => TRUE,
'#src' => NULL,
......@@ -215,19 +215,19 @@ function system_elements() {
'#size' => 60,
'#maxlength' => 128,
'#autocomplete_path' => FALSE,
'#process' => array('form_expand_ahah'),
'#process' => array('form_process_ahah'),
);
$type['password'] = array(
'#input' => TRUE,
'#size' => 60,
'#maxlength' => 128,
'#process' => array('form_expand_ahah'),
'#process' => array('form_process_ahah'),
);
$type['password_confirm'] = array(
'#input' => TRUE,
'#process' => array('expand_password_confirm'),
'#process' => array('form_process_password_confirm'),
);
$type['textarea'] = array(
......@@ -235,50 +235,50 @@ function system_elements() {
'#cols' => 60,
'#rows' => 5,
'#resizable' => TRUE,
'#process' => array('form_expand_ahah'),
'#process' => array('form_process_ahah'),
);
$type['radios'] = array(
'#input' => TRUE,
'#process' => array('expand_radios'),
'#process' => array('form_process_radios'),
);
$type['radio'] = array(
'#input' => TRUE,
'#default_value' => NULL,
'#process' => array('form_expand_ahah'),
'#process' => array('form_process_ahah'),
);
$type['checkboxes'] = array(
'#input' => TRUE,
'#tree' => TRUE,
'#process' => array('expand_checkboxes'),
'#process' => array('form_process_checkboxes'),
);
$type['checkbox'] = array(
'#input' => TRUE,
'#return_value' => 1,
'#process' => array('form_expand_ahah'),
'#process' => array('form_process_ahah'),
);
$type['select'] = array(
'#input' => TRUE,
'#size' => 0,
'#multiple' => FALSE,
'#process' => array('form_expand_ahah'),
'#process' => array('form_process_ahah'),
);
$type['weight'] = array(
'#input' => TRUE,
'#delta' => 10,
'#default_value' => 0,
'#process' => array('process_weight', 'form_expand_ahah'),
'#process' => array('form_process_weight', 'form_process_ahah'),
);
$type['date'] = array(
'#input' => TRUE,
'#element_validate' => array('date_validate'),
'#process' => array('expand_date'),
'#process' => array('form_process_date'),
);
$type['file'] = array(
......@@ -296,7 +296,7 @@ function system_elements() {
$type['hidden'] = array(
'#input' => TRUE,
'#process' => array('form_expand_ahah'),
'#process' => array('form_process_ahah'),
);
$type['value'] = array(
......@@ -312,7 +312,7 @@ function system_elements() {
'#collapsible' => FALSE,
'#collapsed' => FALSE,
'#value' => NULL,
'#process' => array('form_expand_ahah'),
'#process' => array('form_process_ahah'),
);
$type['token'] = array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment