Index: modules/system/system.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.api.php,v
retrieving revision 1.146
diff -u -r1.146 system.api.php
--- modules/system/system.api.php	26 Mar 2010 17:14:45 -0000	1.146
+++ modules/system/system.api.php	26 Mar 2010 22:47:36 -0000
@@ -3191,6 +3191,34 @@
 }
 
 /**
+ * Alter batch information before a batch is processed.
+ *
+ * Called by batch_process() to allow modules to alter a batch before it is
+ * processed. 
+ *
+ * @param $batch
+ *   The associative array of batch information.
+ *
+ * @see batch_set()
+ * @see batch_process()
+ *
+ * @ingroup batch
+ */
+function hook_batch_alter(&$batch) {
+  // If the current page request is inside the overlay, add ?render=overlay to
+  // the success callback URL, so that it appears correctly within the overlay.
+  if (overlay_get_mode() == 'child') {
+    if (isset($batch['url_options']['query'])) {
+      $batch['url_options']['query']['render'] = 'overlay';
+    }
+    else {
+      $batch['url_options']['query'] = array('render' => 'overlay');
+    }
+  }
+}
+
+/**
  * Alter the metadata about available placeholder tokens and token types.
  *
  * @param $data