summaryrefslogtreecommitdiff
path: root/modules/system/system.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system/system.module')
-rw-r--r--modules/system/system.module17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index 4b69e964b..7398653ad 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -993,6 +993,7 @@ function system_menu() {
$items['batch'] = array(
'page callback' => 'system_batch_page',
'access callback' => TRUE,
+ 'theme callback' => '_system_batch_theme',
'type' => MENU_CALLBACK,
'file' => 'system.admin.inc',
);
@@ -1000,6 +1001,22 @@ function system_menu() {
}
/**
+ * Theme callback for the default batch page.
+ */
+function _system_batch_theme() {
+ // Retrieve the current state of the batch.
+ $batch = &batch_get();
+ if (!$batch && isset($_REQUEST['id'])) {
+ require_once DRUPAL_ROOT . '/includes/batch.inc';
+ $batch = batch_load($_REQUEST['id']);
+ }
+ // Use the same theme as the page that started the batch.
+ if (!empty($batch['theme'])) {
+ return $batch['theme'];
+ }
+}
+
+/**
* Implementation of hook_library().
*/
function system_library() {