From 0c79ed846d2763ca0152bba3724e0175f3f3eb7a Mon Sep 17 00:00:00 2001
From: Angie Byron <webchick@24967.no-reply.drupal.org>
Date: Wed, 13 Jan 2010 23:03:31 +0000
Subject: [PATCH] #649224 by David_Rothstein and ksenzee: Fixed Cannot run
 certain batch processes (tests, update manager, etc) with the overlay
 enabled.

---
 modules/overlay/overlay.module | 4 ++--
 modules/system/system.module   | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/overlay/overlay.module b/modules/overlay/overlay.module
index 2e86955b34cc..2f7f77a9730d 100644
--- a/modules/overlay/overlay.module
+++ b/modules/overlay/overlay.module
@@ -517,8 +517,8 @@ function overlay_request_dialog_close($value = NULL) {
  *   The path that should open in the parent window after the overlay closes.
  */
 function overlay_close_dialog($redirect = NULL) {
-  if (empty($redirect)) {
-    $path = $_GET['q'];
+  if (!isset($redirect)) {
+    $redirect = current_path();
   }
   $settings = array(
     'overlayChild' => array(
diff --git a/modules/system/system.module b/modules/system/system.module
index 58d135ffb390..ba88f5678707 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -3591,6 +3591,7 @@ function system_admin_paths() {
   $paths = array(
     'admin' => TRUE,
     'admin/*' => TRUE,
+    'batch' => TRUE,
   );
   return $paths;
 }
-- 
GitLab