_batch_do

Versions
mediamosa-21
_batch_do()

Do one execution pass in JavaScript-mode and return progress to the browser.

See also

_batch_progress_page_js()

@see _batch_process()

▾ 1 function calls _batch_do()

_batch_page in includes/batch.inc
State-based dispatcher for the batch processing page.

Code

includes/batch.inc, line 153

<?php
function _batch_do() {
  // HTTP POST required.
  if ($_SERVER['REQUEST_METHOD'] != 'POST') {
    drupal_set_message(t('HTTP POST is required.'), 'error');
    drupal_set_title(t('Error'));
    return '';
  }

  // Perform actual processing.
  list($percentage, $message) = _batch_process();

  drupal_json_output(array('status' => TRUE, 'percentage' => $percentage, 'message' => $message));
}
?>