diff --git a/core/includes/form.inc b/core/includes/form.inc index 4edd64d..34be1d9 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -1276,7 +1276,7 @@ function drupal_redirect_form($form_state) { if (!isset($form_state['redirect']) || $form_state['redirect'] !== FALSE) { if (isset($form_state['redirect'])) { if (is_array($form_state['redirect'])) { - return new RedirectResponse($form_state['redirect'], 302); + return new RedirectResponse(url($form_state['redirect'][0], $form_state['redirect'][1]), $form_state['redirect'][2]); } else { // This function can be called from the installer, which guarantees @@ -5203,7 +5203,7 @@ function batch_process($redirect = NULL, $url = 'batch', $redirect_callback = NU $function($batch['url'], $options); } else { - return new RedirectResponse(array($batch['url'], $options), 302); + return new RedirectResponse(url($batch['url'], $options), 302); } } else { diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 819e671..ce0df71 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -542,7 +542,10 @@ function install_run_task($task, &$install_state) { } // Process the batch. For progressive batches, this will redirect. // Otherwise, the batch will complete. - batch_process(install_redirect_url($install_state), install_full_redirect_url($install_state)); + $return = batch_process(install_redirect_url($install_state), install_full_redirect_url($install_state)); + if (is_a($return, 'Symfony\Component\HttpFoundation\RedirectResponse')) { + install_goto($return->getTargetUrl()); + } } // If we are in the middle of processing this batch, keep sending back // any output from the batch process, until the task is complete. diff --git a/core/includes/install.inc b/core/includes/install.inc index e9d666f..a85c4dd 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -647,7 +647,17 @@ function drupal_install_fix_file($file, $mask, $message = TRUE) { function install_goto($path) { global $base_url; include_once DRUPAL_ROOT . '/core/includes/common.inc'; - header('Location: ' . $base_url . '/' . $path); + + // TODO this is hacking around symfony's redirection giving us a fully + // qualified url. It's a quick hack to get things working but warrants a + // security review or a better implementation. + if (url_is_external($path)) { + $real_path = $path; + } + else { + $real_path = $base_url . '/' . $path; + } + header('Location: ' . $real_path); header('Cache-Control: no-cache'); // Not a permanent redirect. drupal_exit(); }