commit 301c0f6263e1b4d8dff30755c75bcab7ddf5827e Author: Joel Pittet Date: Sat Jan 17 15:56:09 2015 -0800 remove unused functions and revert url update. diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 255449e..4a6baca 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -418,7 +418,6 @@ function system_authorized_init($callback, $file, $arguments = array(), $page_ti * @see system_authorized_init() */ function system_authorized_get_url(array $options = array()) { - global $base_url; // Prefix with $base_url so url() treats it as an external link. $url = Url::fromUri('base://core/authorize.php'); $url_options = $url->getOptions(); @@ -427,19 +426,6 @@ function system_authorized_get_url(array $options = array()) { } /** - * Returns the URL for the authorize.php script when it is processing a batch. - * - * @param array $options - * Optional array of options to pass to url(). - * - * @return \Drupal\Core\Url - */ -function system_authorized_batch_processing_url(array $options = array()) { - $options['query'] = array('batch' => '1'); - return system_authorized_get_url($options); -} - -/** * Setup and invoke an operation using authorize.php. * * @see system_authorized_init() @@ -450,17 +436,6 @@ function system_authorized_run($callback, $file, $arguments = array(), $page_tit } /** - * Use authorize.php to run batch_process(). - * - * @see batch_process() - */ -function system_authorized_batch_process() { - $finish_url = system_authorized_get_url(); - $process_url = system_authorized_batch_processing_url(); - return batch_process($finish_url->toString(), $process_url->toString()); -} - -/** * @} End of "defgroup authorize". */ diff --git a/core/modules/update/src/Form/UpdateManagerInstall.php b/core/modules/update/src/Form/UpdateManagerInstall.php index b3e2deb..4c0764b 100644 --- a/core/modules/update/src/Form/UpdateManagerInstall.php +++ b/core/modules/update/src/Form/UpdateManagerInstall.php @@ -227,8 +227,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()); } + $form_state->setRedirectUrl(system_authorized_get_url()); } } diff --git a/core/modules/update/src/Form/UpdateReady.php b/core/modules/update/src/Form/UpdateReady.php index 8e106fe..4401d61 100644 --- a/core/modules/update/src/Form/UpdateReady.php +++ b/core/modules/update/src/Form/UpdateReady.php @@ -152,8 +152,8 @@ public function submitForm(array &$form, FormStateInterface $form_state) { // 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()); } + $form_state->setRedirectUrl(system_authorized_get_url()); } } diff --git a/core/modules/update/update.authorize.inc b/core/modules/update/update.authorize.inc index 8709e56..1085380 100644 --- a/core/modules/update/update.authorize.inc +++ b/core/modules/update/update.authorize.inc @@ -51,9 +51,8 @@ function update_authorize_run_update($filetransfer, $projects) { 'file' => drupal_get_path('module', 'update') . '/update.authorize.inc', ); + // Batch will be executed via authorize.php. batch_set($batch); - // Invoke the batch via authorize.php. - return system_authorized_batch_process(); } /** @@ -95,10 +94,9 @@ function update_authorize_run_install($filetransfer, $project, $updater_name, $l 'finished' => 'update_authorize_install_batch_finished', 'file' => drupal_get_path('module', 'update') . '/update.authorize.inc', ); - batch_set($batch); - // Invoke the batch via authorize.php. - return system_authorized_batch_process(); + // Batch will be excuted via authorized.php. + batch_set($batch); } /**