From aeead6cf9c7fa9eeb820391099257c683f54e066 Mon Sep 17 00:00:00 2001 From: Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> Date: Mon, 27 Feb 2006 14:57:54 +0000 Subject: [PATCH] #48209, Prevent system module forms (system/theme settings) from saving 'reset' to the variables table., patch by Markus Petrux --- includes/form.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/form.inc b/includes/form.inc index 83936eed0532..5a392880be06 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -151,9 +151,9 @@ function drupal_validate_form($form_id, &$form, $callback = NULL) { } function drupal_submit_form($form_id, $form, $callback = NULL) { - global $form_values; + // Prevent system module forms (system/theme settings) from saving certain form fields to the variables table. + unset($GLOBALS['form_values']['submit'], $GLOBALS['form_values']['reset'], $GLOBALS['form_values']['form_id']); - unset($GLOBALS['form_values']['submit'], $GLOBALS['form_values']['form_id']); if (isset($form['#submit'])) { foreach ($form['#submit'] as $function => $args) { if (function_exists($function)) { -- GitLab