Skip to content

Commit

Permalink
[Task] Optimized SearchController::findAction (#14538)
Browse files Browse the repository at this point in the history
* optimized findAction in SearchController

* Update bundles/AdminBundle/Controller/Searchadmin/SearchController.php

Co-authored-by: Jacob Dreesen <jacob@hdreesen.de>

* Update bundles/AdminBundle/Controller/Searchadmin/SearchController.php

Co-authored-by: Jacob Dreesen <jacob@hdreesen.de>

* Update bundles/AdminBundle/Controller/Searchadmin/SearchController.php

Co-authored-by: Bernhard Rusch <brusch@users.noreply.github.com>

---------

Co-authored-by: Jacob Dreesen <jacob@hdreesen.de>
Co-authored-by: Bernhard Rusch <brusch@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 14, 2023
1 parent 8e8be7d commit 367b744
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -77,9 +77,9 @@ public function findAction(Request $request, EventDispatcherInterface $eventDisp

$query = $this->filterQueryParam($allParams['query'] ?? '');

$types = explode(',', $allParams['type'] ?? '');
$subtypes = explode(',', $allParams['subtype'] ?? '');
$classnames = explode(',', $allParams['class'] ?? '');
$types = explode(',', preg_replace("/[^a-z,]/i", '', $allParams['type'] ?? ''));
$subtypes = explode(',', preg_replace("/[^a-z,]/i", '', $allParams['subtype'] ?? ''));
$classnames = explode(',', preg_replace("/[^a-z0-9_,]/i", '', $allParams['class'] ?? ''));

$offset = (int)$allParams['start'];
$limit = (int)$allParams['limit'];
Expand Down

0 comments on commit 367b744

Please sign in to comment.