From 4372e4c92b36bfe9a464d59b66f85aa0f5f79813 Mon Sep 17 00:00:00 2001 From: Greg Dunlap Date: Wed, 7 Dec 2011 21:24:50 +0100 Subject: [PATCH] Working on undoing the system_settings_form stuff in system module --- core/modules/system/system.admin.inc | 39 +++++----------------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 47c40754f4c..83548bc487e 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -1655,38 +1655,6 @@ function system_performance_settings($form, &$form_state) { '#submit' => array('system_clear_cache_submit'), ); - // TODO: This is a complete hack. The idea is - we need to stash some state - // with this form, so that when it comes time to save, we can go from a key - // in $form_state['values'] to that state. I started trying to put this state - // with each form element, but I have NFI how to get to a form element from - // a key in $form_state['values']. - $form_state['config'] = array( - 'cache' => array( - 'name' => 'system.performance', - 'path' => 'caching.cache', - ), - 'cache_lifetime' => array( - 'name' => 'system.performance', - 'path' => 'caching.cache_lifetime', - ), - 'page_cache_maximum_age' => array( - 'name' => 'system.performance', - 'path' => 'caching.page_cache_maximum_age', - ), - 'page_compression' => array( - 'name' => 'system.performance', - 'path' => 'bandwidth_optimization.page_compression', - ), - 'preprocess_css' => array( - 'name' => 'system.performance', - 'path' => 'bandwidth_optimization.preprocess_css', - ), - 'preprocess_js' => array( - 'name' => 'system.performance', - 'path' => 'bandwidth_optimization.preprocess_js', - ), - ); - $form['caching'] = array( '#type' => 'fieldset', '#title' => t('Caching'), @@ -1756,7 +1724,12 @@ function system_performance_settings($form, &$form_state) { // invalidate the page cache, so it needs to be cleared on form submit. $form['#submit'][] = 'system_clear_page_cache_submit'; - return system_settings_form($form); + $form['submit'] = array( + '#type' => 'submit', + '#value' => t('Save configuration') + ); + + return $form; } /**