Skip to content

Commit

Permalink
fix row ids too
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 committed Jan 24, 2024
1 parent 7bb0309 commit 0687a41
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Search/Input/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,6 @@ public static function displayCriteria($request = [])
*/
public static function displayMetaCriteria($request = [])
{
/** @var array $CFG_GLPI */
global $CFG_GLPI;

if (
!isset($request["itemtype"])
|| !isset($request["num"])
Expand Down Expand Up @@ -518,7 +515,7 @@ public static function displayMetaCriteria($request = [])
$linked = SearchEngine::getMetaItemtypeAvailable($itemtype);
$rand = mt_rand();

$rowid = 'metasearchrow' . $request['itemtype'] . $rand;
$rowid = 'metasearchrow' . Toolbox::getNormalizedItemtype($request['itemtype']) . $rand;
TemplateRenderer::getInstance()->display('components/search/query_builder/metacriteria.html.twig', [
'row_id' => $rowid,
'metacriteria' => $metacriteria,
Expand Down Expand Up @@ -613,7 +610,7 @@ public static function displayCriteriaGroup($request = [])
$num = (int) $request['num'];
$p = $request['p'];
$randrow = mt_rand();
$rowid = 'searchrow' . $request['itemtype'] . $randrow;
$rowid = 'searchrow' . Toolbox::getNormalizedItemtype($request['itemtype']) . $randrow;
$prefix = isset($p['prefix_crit']) ? htmlspecialchars($p['prefix_crit']) : '';
$parents_num = isset($p['parents_num']) ? $p['parents_num'] : [];

Expand Down

0 comments on commit 0687a41

Please sign in to comment.