diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-03 20:17:46 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-03 20:17:46 +0000 |
commit | 0e161b661e2e87d11415093cc33803faf27d7182 (patch) | |
tree | ac63e311eb1e69a82ba32ce7fda199f5abdc150c /includes/update.inc | |
parent | 919d94be6eeaa0f4b455dfc12663527b9d08ef0a (diff) | |
download | brdo-0e161b661e2e87d11415093cc33803faf27d7182.tar.gz brdo-0e161b661e2e87d11415093cc33803faf27d7182.tar.bz2 |
- Patch #555762 by gordon, sun | yched, chx, moshe weitzman, KiamLaLuno, lilou: improvements to batch API.
Diffstat (limited to 'includes/update.inc')
-rw-r--r-- | includes/update.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/update.inc b/includes/update.inc index 89deb3ba9..a4005d3ef 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -361,8 +361,11 @@ class DrupalUpdateException extends Exception { } * scripts like update.php). * @param $batch * Optional parameters to pass into the batch API. + * @param $redirect_callback + * (optional) Specify a function to be called to redirect to the progressive + * processing page. */ -function update_batch($start, $redirect = NULL, $url = NULL, $batch = array()) { +function update_batch($start, $redirect = NULL, $url = NULL, $batch = array(), $redirect_callback = 'drupal_goto') { // During the update, bring the site offline so that schema changes do not // affect visiting users. $_SESSION['maintenance_mode'] = variable_get('maintenance_mode', FALSE); @@ -393,7 +396,7 @@ function update_batch($start, $redirect = NULL, $url = NULL, $batch = array()) { 'file' => 'includes/update.inc', ); batch_set($batch); - batch_process($redirect, $url); + batch_process($redirect, $url, $redirect_callback); } /** |