From 7a8773ef145ea4b912b3a765d627e533c468dd12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Fri, 28 Sep 2007 13:06:46 +0000 Subject: #176141 by yched and myself: only print install page layout, if there is some output to send to the user. If JSON output is generated, it is already printed and should not be themed with HTML. --- install.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'install.php') diff --git a/install.php b/install.php index 2a254abcc..47661db96 100644 --- a/install.php +++ b/install.php @@ -616,7 +616,6 @@ function install_missing_modules_error($profile) { */ function install_tasks($profile, $task) { global $base_url, $install_locale; - $output = ''; // Bootstrap newly installed Drupal, while preserving existing messages. $messages = isset($_SESSION['messages']) ? $_SESSION['messages'] : ''; @@ -716,7 +715,7 @@ function install_tasks($profile, $task) { if ($task == 'locale-batch') { include_once 'includes/batch.inc'; include_once 'includes/locale.inc'; - $output .= _batch_page(); + $output = _batch_page(); } // Display a 'finished' page to user. @@ -744,8 +743,11 @@ function install_tasks($profile, $task) { install_task_list($task); variable_set('install_task', $task); - // Output page. - print theme('maintenance_page', $output); + // Output page, if some output was required. Otherwise it is possible + // that we are printing a JSON page and theme output should not be there. + if (isset($output)) { + print theme('maintenance_page', $output); + } } /** -- cgit v1.2.3