You are here

function coder_upgrade_conversions_form_submit in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/includes/conversion.inc \coder_upgrade_conversions_form_submit()

Submit handler for the module conversion form.

Execute the selected module conversion code on the selected file types in the selected directories or modules.

File

coder_upgrade/includes/conversion.inc, line 271

Code

function coder_upgrade_conversions_form_submit($form, &$form_state) {

  // Rebuild form with user selections.
  $form_state['rebuild'] = TRUE;

  // Apply conversion routines.
  $success = coder_upgrade_conversions_apply($form_state);
  if ($success) {
    drupal_set_message(t('Module conversion routines were applied.'));
    drupal_set_message(t('Click to view the !log.', array(
      '!log' => l(t('conversion log file'), coder_upgrade_path('log'), array(
        'attributes' => array(
          'target' => '_blank',
        ),
      )),
    )));
    drupal_set_message(t('To view a <strong>patch file</strong>, click on a <strong>Name link</strong> in the Directories and Modules tabs below.'));
  }
  else {
    drupal_set_message(t('Module conversion routines failed to complete.'), 'error');
  }
}