You are here

function scanner_confirm_form_submit in Search and Replace Scanner 6

Same name and namespace in other branches
  1. 5.2 scanner.module \scanner_confirm_form_submit()
  2. 7 scanner.module \scanner_confirm_form_submit()

Submission handling for scanner confirmation form.

File

./scanner.module, line 543
Search and Replace Scanner - works on all nodes text content.

Code

function scanner_confirm_form_submit($form, &$form_state) {

  /* TODO The 'op' element in the form values is deprecated.
     Each button can have #validate and #submit functions associated with it.
     Thus, there should be one button that submits the form and which invokes
     the normal form_id_validate and form_id_submit handlers. Any additional
     buttons which need to invoke different validate or submit functionality
     should have button-specific functions. */
  if ($form_state['values']['op'] == t('Yes, Continue')) {
    $_SESSION['scanner_status'] = SCANNER_STATUS_GO_REPLACE;
  }
  else {
    unset($_SESSION['scanner_status']);
  }
  $form_state['redirect'] = 'admin/content/scanner';
}