You are here

function _flowplayer_admin_form_submit in SWF Tools 5

1 call to _flowplayer_admin_form_submit()
flowplayer_admin_form_submit in flowplayer/flowplayer.module

File

flowplayer/flowplayer.admin.inc, line 108

Code

function _flowplayer_admin_form_submit($form_id, &$form_values) {

  // Flatten settings for saving
  $saved = array();
  foreach ($form_values as $player => $settings) {
    $flat[$player] = array();
    if (is_array($settings)) {
      foreach ($settings as $category => $vars) {
        $flat[$player] = array_merge($flat[$player], $vars);
      }
      variable_set('swftools_' . $player, $flat[$player]);
    }
  }

  // Clear caches
  cache_clear_all();
  cache_clear_all('*', 'cache_filter', TRUE);
}