Loading src/Controller/ViewsShareController.php +5 −5 Changes for src/Controller/ViewsShareController.php: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -173,7 +173,7 @@ class ViewsShareController extends ControllerBase { */ public function preview(string $view_id, string $display_id, Request $request): Response { $view = Views::getView($view_id); if (!$view) { if (!$view || !$view->access($display_id)) { return new Response('View not found.', 404); } Loading Loading @@ -367,10 +367,10 @@ class ViewsShareController extends ControllerBase { * @param \Symfony\Component\HttpFoundation\Request $request * The request. * * @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\JsonResponse|\Symfony\Component\HttpFoundation\Response * The oEmbed data as JSON. */ public function oembed(string $view_id, string $display_id, Request $request): Response { public function oembed(string $view_id, string $display_id, Request $request): JsonResponse|Response { $view = Views::getView($view_id); if (!$view || !$view->access($display_id)) { return new JsonResponse(['error' => 'Access denied'], 403); Loading Loading @@ -417,7 +417,7 @@ class ViewsShareController extends ControllerBase { } // Get the format to return based on user's selected input. $format = $request->get('format'); $format = $request->query->get('format'); if ($format === 'xml') { // Convert the oEmbed data to XML format. $xml = new \SimpleXMLElement('<oembed/>'); Loading Loading @@ -448,7 +448,7 @@ class ViewsShareController extends ControllerBase { */ public function modal(string $view_id, string $display_id, Request $request): Response { $view = Views::getView($view_id); if (!$view) { if (!$view || !$view->access($display_id)) { return new Response('View not found.', 404); } Loading Loading
src/Controller/ViewsShareController.php +5 −5 Changes for src/Controller/ViewsShareController.php: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -173,7 +173,7 @@ class ViewsShareController extends ControllerBase { */ public function preview(string $view_id, string $display_id, Request $request): Response { $view = Views::getView($view_id); if (!$view) { if (!$view || !$view->access($display_id)) { return new Response('View not found.', 404); } Loading Loading @@ -367,10 +367,10 @@ class ViewsShareController extends ControllerBase { * @param \Symfony\Component\HttpFoundation\Request $request * The request. * * @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\JsonResponse|\Symfony\Component\HttpFoundation\Response * The oEmbed data as JSON. */ public function oembed(string $view_id, string $display_id, Request $request): Response { public function oembed(string $view_id, string $display_id, Request $request): JsonResponse|Response { $view = Views::getView($view_id); if (!$view || !$view->access($display_id)) { return new JsonResponse(['error' => 'Access denied'], 403); Loading Loading @@ -417,7 +417,7 @@ class ViewsShareController extends ControllerBase { } // Get the format to return based on user's selected input. $format = $request->get('format'); $format = $request->query->get('format'); if ($format === 'xml') { // Convert the oEmbed data to XML format. $xml = new \SimpleXMLElement('<oembed/>'); Loading Loading @@ -448,7 +448,7 @@ class ViewsShareController extends ControllerBase { */ public function modal(string $view_id, string $display_id, Request $request): Response { $view = Views::getView($view_id); if (!$view) { if (!$view || !$view->access($display_id)) { return new Response('View not found.', 404); } Loading