diff --git a/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php b/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php index e03a4e8..b83ac77 100644 --- a/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php +++ b/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php @@ -31,7 +31,7 @@ class ViewAjaxController implements ControllerInterface { protected $storageController; /** - * The factory to load a view executable. + * The factory to load a view executable with. * * @var \Drupal\views\ViewExecutableFactory */ @@ -43,7 +43,7 @@ class ViewAjaxController implements ControllerInterface { * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller * The entity storage controller for views. * @param \Drupal\views\ViewExecutableFactory $executable_factory - * The factory to load a view executable. + * The factory to load a view executable with. */ public function __construct(EntityStorageControllerInterface $storage_controller, ViewExecutableFactory $executable_factory) { $this->storageController = $storage_controller; @@ -61,13 +61,13 @@ public static function create(ContainerInterface $container) { } /** - * Loads and render a view via AJAX. + * Loads and renders a view via AJAX. * * @param \Symfony\Component\HttpFoundation\Request $request * The current request object. * * @return \Drupal\views\Ajax\ViewAjaxResponse - * The view response as ajax response. + * The view response as ajax response. * * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException * Thrown when the view was not found. @@ -86,15 +86,11 @@ public function ajaxView(Request $request) { $response = new ViewAjaxResponse(); - // Remove all of this stuff from the query of the request so it doesn't end - // up in pagers and tablesort URLs. + // Remove all of this stuff from the query of the request so it doesn't + // end up in pagers and tablesort URLs. foreach (array('view_name', 'view_display_id', 'view_args', 'view_path', 'view_dom_id', 'pager_element', 'view_base_path', 'ajax_html_ids', 'ajax_page_state') as $key) { - if ($request->query->has($key)) { - $request->query->remove($key); - } - if ($request->request->has($key)) { - $request->request->remove($key); - } + $request->query->remove($key); + $request->request->remove($key); } // Load the view.