You are here

function cacheflush_list_preset_form_submit in CacheFlush 7

Same name and namespace in other branches
  1. 7.2 cacheflush.admin.inc \cacheflush_list_preset_form_submit()

Implements hook_formID_submit().

File

./cacheflush.admin.inc, line 76
Cacheflush admin for list presets.

Code

function cacheflush_list_preset_form_submit(&$form, &$form_state) {

  // Update the presets status.
  foreach ($form_state['values']['preset_list'] as $key => $value) {
    $form_state['cacheflush_preset_list'][$key]['#enabled'] = $value;
  }

  // Save the result.
  variable_set('cacheflush_preset_list', $form_state['cacheflush_preset_list']);
  drupal_set_message(t('Preset list enabled/disabled.'), 'status');

  // Rebuild Menu.
  node_types_rebuild();
  menu_rebuild();
}