From 26ba37823e03e6c9585f7a96374b92405a69789e Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Wed, 1 Mar 2006 09:01:34 +0000 Subject: [PATCH] - Patch #50982 by kuba: converted the admin filter overview page to the submit-model. --- modules/filter.module | 16 ++++++++-------- modules/filter/filter.module | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/filter.module b/modules/filter.module index 1c6361122e1f..dab9dc762bf4 100644 --- a/modules/filter.module +++ b/modules/filter.module @@ -271,14 +271,6 @@ function filter_perm() { */ function filter_admin_overview() { - $edit = isset($_POST['edit']) ? $_POST['edit'] : ''; - - // Process form submission to set the default format - if (is_numeric($edit['default'])) { - drupal_set_message(t('Default format updated.')); - variable_set('filter_default_format', $edit['default']); - } - // Overview of all formats. $formats = filter_formats(); $error = false; @@ -305,6 +297,14 @@ function filter_admin_overview() { return drupal_get_form('filter_admin_overview', $form); } +function filter_admin_overview_submit($form_id, $form_values) { + // Process form submission to set the default format + if (is_numeric($form_values['default'])) { + drupal_set_message(t('Default format updated.')); + variable_set('filter_default_format', $form_values['default']); + } +} + function theme_filter_admin_overview($form) { foreach ($form as $name => $element) { if (isset($element['roles']) && is_array($element['roles'])) { diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 1c6361122e1f..dab9dc762bf4 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -271,14 +271,6 @@ function filter_perm() { */ function filter_admin_overview() { - $edit = isset($_POST['edit']) ? $_POST['edit'] : ''; - - // Process form submission to set the default format - if (is_numeric($edit['default'])) { - drupal_set_message(t('Default format updated.')); - variable_set('filter_default_format', $edit['default']); - } - // Overview of all formats. $formats = filter_formats(); $error = false; @@ -305,6 +297,14 @@ function filter_admin_overview() { return drupal_get_form('filter_admin_overview', $form); } +function filter_admin_overview_submit($form_id, $form_values) { + // Process form submission to set the default format + if (is_numeric($form_values['default'])) { + drupal_set_message(t('Default format updated.')); + variable_set('filter_default_format', $form_values['default']); + } +} + function theme_filter_admin_overview($form) { foreach ($form as $name => $element) { if (isset($element['roles']) && is_array($element['roles'])) { -- GitLab