function media_upgrade_file_types_submit

cis7 media.pages.inc media_upgrade_file_types_submit($form, &$form_state)
cle7 media.pages.inc media_upgrade_file_types_submit($form, &$form_state)
elmsmedia7 media.pages.inc media_upgrade_file_types_submit($form, &$form_state)
icor7 media.pages.inc media_upgrade_file_types_submit($form, &$form_state)
meedjum_blog7 media.pages.inc media_upgrade_file_types_submit($form, &$form_state)
mooc7 media.pages.inc media_upgrade_file_types_submit($form, &$form_state)

File type migration page submit handler.

File

sites/all/modules/ulmus/media/includes/media.pages.inc, line 176
Common pages for the Media module.

Code

function media_upgrade_file_types_submit($form, &$form_state) {
  $migratable_types = _media_get_migratable_file_types();
  $migrate = FALSE;
  foreach ($migratable_types as $type) {
    if ($form_state['values'][$type]) {
      $migrate = TRUE;
      break;
    }
  }

  // Return silently if no types were selected for migration.
  if (!$migrate) {
    return;
  }

  // Use confirmation page/form.
  $query = $form_state['values'];
  unset($query['op']);
  unset($query['submit']);
  unset($query['form_id']);
  unset($query['form_token']);
  unset($query['form_build_id']);

  $form_state['redirect'] = array(
    'admin/structure/file-types/upgrade/confirm',
    array('query' => $query),
  );
}