You are here

function media_wysiwyg_admin_config_browser_pre_submit in D7 Media 7.3

Same name and namespace in other branches
  1. 7.4 modules/media_wysiwyg/media_wysiwyg.module \media_wysiwyg_admin_config_browser_pre_submit()
  2. 7.2 modules/media_wysiwyg/media_wysiwyg.module \media_wysiwyg_admin_config_browser_pre_submit()

Manipulate values before form is submitted.

1 string reference to 'media_wysiwyg_admin_config_browser_pre_submit'
media_wysiwyg_form_media_admin_config_browser_alter in modules/media_wysiwyg/media_wysiwyg.module
Implements hook_form_FORM_ID_alter().

File

modules/media_wysiwyg/media_wysiwyg.module, line 346
Primarily Drupal hooks.

Code

function media_wysiwyg_admin_config_browser_pre_submit(&$form, &$form_state) {
  $wysiwyg_browser_plugins = array_unique(array_values($form_state['values']['media_wysiwyg_wysiwyg_browser_plugins']));
  if (empty($wysiwyg_browser_plugins[0])) {
    variable_del('media_wysiwyg_wysiwyg_browser_plugins');
    unset($form_state['values']['media_wysiwyg_wysiwyg_browser_plugins']);
  }
}