diff --git a/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php b/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php index a922585..ffffc78 100644 --- a/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php +++ b/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php @@ -7,6 +7,7 @@ namespace Drupal\locale\Controller; use Drupal\Core\Controller\ControllerInterface; +use Drupal\Core\Routing\PathBasedGeneratorInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\RedirectResponse; @@ -28,8 +29,9 @@ class LocaleController implements ControllerInterface { * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler. */ - public function __construct(ModuleHandlerInterface $module_handler) { + public function __construct(ModuleHandlerInterface $module_handler, PathBasedGeneratorInterface $url_generator) { $this->moduleHandler = $module_handler; + $this->urlGenerator = $url_generator; } /** @@ -64,7 +66,6 @@ public function checkTranslation() { return batch_process('admin/reports/translations'); } - $url = $this->urlGenerator->generateFromPath('admin/reports/translations', array('absolute' => TRUE)); - return new RedirectResponse($url); + return new RedirectResponse($this->urlGenerator->generateFromPath('admin/reports/translations', array('absolute' => TRUE))); } }