diff --git a/core/modules/system/lib/Drupal/system/SystemConfigFormBase.php b/core/modules/system/lib/Drupal/system/SystemConfigFormBase.php index 25b8d28..81b80f1 100644 --- a/core/modules/system/lib/Drupal/system/SystemConfigFormBase.php +++ b/core/modules/system/lib/Drupal/system/SystemConfigFormBase.php @@ -59,8 +59,8 @@ public function buildForm(array $form, array &$form_state) { '#button_type' => 'primary', ); - // By default, render the form using theme_system_settings_form(). - $form['#theme'] = 'system_settings_form'; + // By default, render the form using theme_system_config_form(). + $form['#theme'] = 'system_config_form'; return $form; } diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 994eebf..c6002f9 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -1418,7 +1418,7 @@ function system_modules_uninstall_submit($form, &$form_state) { * Form builder; The general site information form. * * @ingroup forms - * @see system_settings_form() + * @see system_config_form() */ function system_site_information_settings($form, &$form_state) { config_context_enter('config.context.free'); @@ -1773,7 +1773,7 @@ function system_clear_page_cache_submit($form, &$form_state) { * Form builder; Configure the site file handling. * * @ingroup forms - * @see system_settings_form_sumbit() + * @see system_file_system_settings_submit() */ function system_file_system_settings($form, $form_state) { $config = config('system.file'); diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 84d1f56..a59d8eb 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -2774,7 +2774,7 @@ function hook_update_last_removed() { * Remove any information that the module sets. * * The information that the module should remove includes: - * - variables that the module has set using variable_set() or system_settings_form() + * - variables that the module has set using variable_set() * - modifications to existing tables * * The module should not remove its entry from the module configuration. diff --git a/core/modules/system/system.module b/core/modules/system/system.module index aaedc09..74c99bc 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -142,7 +142,7 @@ function system_theme() { 'variables' => array('theme_groups' => NULL), 'file' => 'system.admin.inc', ), - 'system_settings_form' => array( + 'system_config_form' => array( 'render element' => 'form', ), 'confirm_form' => array( @@ -3291,53 +3291,6 @@ function system_default_region($theme) { } /** - * Add default buttons to a form and set its prefix. - * - * @param $form - * An associative array containing the structure of the form. - * - * @return - * The form structure. - * - * @see system_settings_form_submit() - * @ingroup forms - */ -function system_settings_form($form) { - $form['actions']['#type'] = 'actions'; - $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration')); - - if (!empty($_POST) && form_get_errors()) { - drupal_set_message(t('The settings have not been saved because of the errors.'), 'error'); - } - $form['#submit'][] = 'system_settings_form_submit'; - // By default, render the form using theme_system_settings_form(). - if (!isset($form['#theme'])) { - $form['#theme'] = 'system_settings_form'; - } - return $form; -} - -/** - * Execute the system_settings_form. - * - * If you want node type configure style handling of your checkboxes, - * add an array_filter value to your form. - */ -function system_settings_form_submit($form, &$form_state) { - // Exclude unnecessary elements. - form_state_values_clean($form_state); - - foreach ($form_state['values'] as $key => $value) { - if (is_array($value) && isset($form_state['values']['array_filter'])) { - $value = array_keys(array_filter($value)); - } - variable_set($key, $value); - } - - drupal_set_message(t('The configuration options have been saved.')); -} - -/** * Adds default behavior to a configuration form. * * This includes a consistent 'Save configuration' button, theme definition, @@ -3379,9 +3332,9 @@ function system_config_form($form, &$form_state) { } $form['#submit'][] = 'system_config_form_submit'; - // By default, render the form using theme_system_settings_form(). + // By default, render the form using theme_system_config_form(). if (!isset($form['#theme'])) { - $form['#theme'] = 'system_settings_form'; + $form['#theme'] = 'system_config_form'; } return $form; } @@ -3969,7 +3922,7 @@ function theme_confirm_form($variables) { * * @ingroup themeable */ -function theme_system_settings_form($variables) { +function theme_system_config_form($variables) { return drupal_render_children($variables['form']); }