#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.

6.x
Gábor Hojtsy 2007-09-28 13:06:46 +00:00
parent 881ab03b97
commit 7a8773ef14
1 changed files with 6 additions and 4 deletions

View File

@ -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);
}
}
/**