function _batch_shutdown

_batch_shutdown()

Shutdown function: Stores the current batch data for the next request.

See also

_batch_page()

drupal_register_shutdown_function()

File

includes/batch.inc, line 532
Batch processing API for processes to run in multiple HTTP requests.

Code

function _batch_shutdown() {
  if ($batch = batch_get()) {
    db_update('batch')
      ->fields(array('batch' => serialize($batch)))
      ->condition('bid', $batch['id'])
      ->execute();
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!batch.inc/function/_batch_shutdown/7.x