diff options
Diffstat (limited to 'includes/form.inc')
-rw-r--r-- | includes/form.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc index 7a05010f1..51c84f381 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -2794,7 +2794,7 @@ function form_clean_id($id = NULL, $flush = FALSE) { * foreach ($results as $result) { * $items[] = t('Loaded node %title.', array('%title' => $result)); * } - * drupal_set_session('my_batch_results', $items); + * $_SESSION['my_batch_results'] = $items; * } * @endcode */ @@ -2952,6 +2952,9 @@ function batch_process($redirect = NULL, $url = NULL) { )) ->execute(); + // Set the batch number in the session to guarantee that it will stay alive. + $_SESSION['batches'][$batch['id']] = TRUE; + drupal_goto($batch['url'], 'op=start&id=' . $batch['id']); } else { |