diff --git a/core/modules/update/src/Form/UpdateManagerInstall.php b/core/modules/update/src/Form/UpdateManagerInstall.php index b6f1855..26938cd 100644 --- a/core/modules/update/src/Form/UpdateManagerInstall.php +++ b/core/modules/update/src/Form/UpdateManagerInstall.php @@ -12,7 +12,6 @@ use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Updater\Updater; -use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -210,6 +209,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $this->moduleHandler->loadInclude('update', 'inc', 'update.authorize'); $filetransfer = new Local(DRUPAL_ROOT); call_user_func_array('update_authorize_run_install', array_merge(array($filetransfer), $arguments)); + $form_state->setRedirectUrl(system_authorized_batch_processing_url()); } // Otherwise, go through the regular workflow to prompt for FTP/SSH @@ -217,9 +217,8 @@ public function submitForm(array &$form, FormStateInterface $form_state) { // whatever FileTransfer object authorize.php creates for us. else { system_authorized_init('update_authorize_run_install', drupal_get_path('module', 'update') . '/update.authorize.inc', $arguments, $this->t('Update manager')); + $form_state->setRedirectUrl(system_authorized_get_url()); } - $redirect_url = Url::fromUri('base://core/authorize.php'); - $form_state->setRedirectUrl($redirect_url); } } diff --git a/core/modules/update/src/Form/UpdateReady.php b/core/modules/update/src/Form/UpdateReady.php index c6de99c..a417600 100644 --- a/core/modules/update/src/Form/UpdateReady.php +++ b/core/modules/update/src/Form/UpdateReady.php @@ -13,7 +13,6 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\Core\State\StateInterface; use Drupal\Core\Updater\Updater; -use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -136,15 +135,15 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $this->moduleHandler->loadInclude('update', 'inc', 'update.authorize'); $filetransfer = new Local(DRUPAL_ROOT); update_authorize_run_update($filetransfer, $updates); + $form_state->setRedirectUrl(system_authorized_batch_processing_url()); } // Otherwise, go through the regular workflow to prompt for FTP/SSH // credentials and invoke update_authorize_run_update() indirectly with // whatever FileTransfer object authorize.php creates for us. else { system_authorized_init('update_authorize_run_update', drupal_get_path('module', 'update') . '/update.authorize.inc', array($updates), $this->t('Update manager')); + $form_state->setRedirectUrl(system_authorized_get_url()); } - $redirect_url = Url::fromUri('base://core/authorize.php'); - $form_state->setRedirectUrl($redirect_url); } }