Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function batch_load

Loads a batch from the database.

Parameters

$id: The ID of the batch to load. When a progressive batch is being processed, the relevant ID is found in $_REQUEST['id'].

Return value

An array representing the batch, or FALSE if no batch was found.

2 calls to batch_load()
_batch_page in includes/batch.inc
Renders the batch processing page based on the current state of the batch.
_system_batch_theme in modules/system/system.module
Theme callback for the default batch page.

File

includes/batch.inc, line 27

Code

function batch_load ($id) {
 $batch = db_query ("SELECT batch FROM {batch} WHERE bid = :bid AND token = :token", array(
 ':bid' => $id,
 ':token' => drupal_get_token ($id),
 ))->fetchField ();
 if ($batch) {
 return unserialize ($batch);
 }
 return FALSE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.