You are here

function scanner_confirm_form_submit in Search and Replace Scanner 7

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

Form submission handler for scanner_confirm_form().

See also

scanner_confirm_form()

File

./scanner.module, line 530
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';
}