diff --git c/core/modules/update/lib/Drupal/update/Controller/UpdateController.php w/core/modules/update/lib/Drupal/update/Controller/UpdateController.php index 0f70b52..49f273e 100644 --- c/core/modules/update/lib/Drupal/update/Controller/UpdateController.php +++ w/core/modules/update/lib/Drupal/update/Controller/UpdateController.php @@ -7,6 +7,7 @@ namespace Drupal\update\Controller; +use Drupal\Core\Controller\ControllerBase; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -14,7 +15,7 @@ /** * Controller routines for update routes. */ -class UpdateController implements ContainerInjectionInterface { +class UpdateController extends ControllerBase implements ContainerInjectionInterface { /** * Module handler service. @@ -63,27 +64,14 @@ public function updateStatus() { } /** - * Checks for updates and displays the update status report. - * * Manually checks the update status without the use of cron. * - * @see update_menu() + * @return \Symfony\Component\HttpFoundation\RedirectResponse|null + * A redirect response if the batch is progressive. No return value otherwise. */ function updateManualStatus() { - $this->moduleHandler->loadInclude('update', 'fetch.inc'); - _update_refresh(); - $batch = array( - 'operations' => array( - array('update_fetch_data_batch', array()), - ), - 'finished' => 'update_fetch_data_finished', - 'title' => t('Checking available update data'), - 'progress_message' => t('Trying to check available update data ...'), - 'error_message' => t('Error checking available update data.'), - 'file' => drupal_get_path('module', 'update') . '/update.fetch.inc', - ); - batch_set($batch); - return batch_process('admin/reports/updates'); + module_load_include('fetch.inc', 'update'); + return update_manual_status(); } } diff --git c/core/modules/update/update.fetch.inc w/core/modules/update/update.fetch.inc index d8abe7a..e84c691 100644 --- c/core/modules/update/update.fetch.inc +++ w/core/modules/update/update.fetch.inc @@ -9,6 +9,29 @@ use Drupal\Component\Utility\Crypt; /** + * Page callback: Checks for updates and displays the update status report. + * + * Manually checks the update status without the use of cron. + * + * @see update_menu() + */ +function update_manual_status() { + _update_refresh(); + $batch = array( + 'operations' => array( + array('update_fetch_data_batch', array()), + ), + 'finished' => 'update_fetch_data_finished', + 'title' => t('Checking available update data'), + 'progress_message' => t('Trying to check available update data ...'), + 'error_message' => t('Error checking available update data.'), + 'file' => drupal_get_path('module', 'update') . '/update.fetch.inc', + ); + batch_set($batch); + return batch_process('admin/reports/updates'); +} + +/** * Batch callback: Processes a step in batch for fetching available update data. * * @param $context