function overlay_batch_alter
Implements hook_batch_alter().
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.
See also
File
- 
              modules/overlay/ overlay.module, line 288 
Code
function overlay_batch_alter(&$batch) {
  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',
      );
    }
  }
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
