function batch_get

6.x batch.module batch_get($batch_id)
5.x batch.module batch_get($batch_id)

Return the batch_data array for this batch_id, or FALSE if it doesn't exist or can't be unserialized.

Parameters

unknown_type $batch_id:

5 calls to batch_get()
batch_ajax_callback in modules/batch/batch.module
This function is called by ajax, and will trigger each run of the batch operation function, then return appropriate results back to our javascript.
batch_finished_page in modules/batch/batch.module
We redirect to this page when we have finished a batch.
batch_processing_page in modules/batch/batch.module
This is the page the user sees while a batch is being processed.
batch_start_batch_from_form_submit in modules/batch/batch.module
A batch process is being initiated from a form submission.
stats_download_csv_from_batch in modules/stats/stats.module
Lets the user download a CSV file from a completed batch.

File

modules/batch/batch.module, line 335

Code

function batch_get($batch_id) {
  $res = db_query("SELECT * FROM batch_queue 
                   WHERE batch_id = ? ", $batch_id);
  $cur = db_fetch_array($res);

  if ($batch = unserialize($cur ["batch_data"])) {
    $batch ["batch_id"] = $batch_id;
    $batch ["token"] = $cur ["token"];
    $batch ["created"] = $cur ["created"];

    return $batch;
  }

  return FALSE;

}