You are here

function _security_review_batch_finished in Security Review 7

Same name and namespace in other branches
  1. 6 security_review.module \_security_review_batch_finished()

Finished callback for Batch processing the checklist.

1 string reference to '_security_review_batch_finished'
security_review_run_form_submit in ./security_review.pages.inc

File

./security_review.module, line 240
Site security review and reporting Drupal module.

Code

function _security_review_batch_finished($success, $results, $operations) {
  variable_set('security_review_last_run', time());
  module_load_include('inc', 'security_review');
  if ($success) {
    if (!empty($results)) {

      // Store results in our present table.
      $storage_result = security_review_store_results($results);
    }
    drupal_set_message(t('Review complete'));
  }
  else {
    $error_operation = reset($operations);
    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
    _security_review_log('', '', $message, array(), WATCHDOG_ERROR);
    drupal_set_message(t('The review did not store all results, please run again or check the logs for details.'));
  }
}