You are here

function scanner_form_submit in Search and Replace Scanner 5.2

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

Handles submission of the search and replace form.

Parameters

$form_id:

$form_values:

Return value

the new path that will be goto'ed.

File

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

Code

function scanner_form_submit($form_id, $form_values) {

  //save form input:
  $_SESSION['scanner_search'] = $form_values['search'];
  $_SESSION['scanner_preceded'] = $form_values['preceded'];

  //$_SESSION['scanner_notpreceded'] = $form_values['notpreceded'];
  $_SESSION['scanner_followed'] = $form_values['followed'];

  //$_SESSION['scanner_notfollowed'] = $form_values['notfollowed'];
  $_SESSION['scanner_mode'] = $form_values['mode'];
  $_SESSION['scanner_wholeword'] = $form_values['wholeword'];
  $_SESSION['scanner_published'] = $form_values['published'];
  $_SESSION['scanner_regex'] = $form_values['regex'];
  $_SESSION['scanner_terms'] = $form_values['terms'];
  $_SESSION['scanner_replace'] = $form_values['replace'];
  if ($form_values['op'] == 'Replace') {
    $_SESSION['scanner_status'] = SCANNER_STATUS_GO_CONFIRM;
  }
  else {
    $_SESSION['scanner_status'] = SCANNER_STATUS_GO_SEARCH;
  }
  return 'admin/content/scanner';
}