_batch_do

Versions
6 – 7
_batch_do()

Do one pass of execution and inform back the browser about progression (used for JavaScript-mode only).

▾ 1 function calls _batch_do()

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

Code

includes/batch.inc, line 96

<?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(array('status' => TRUE, 'percentage' => $percentage, 'message' => $message));
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.