Skip to content

Commit

Permalink
chore: autocomplete helpers also use entity subtype
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalsem committed Apr 15, 2024
1 parent b3ce8e2 commit accccf2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/ColdTrick/SearchAdvanced/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ public static function getAutocompleteUsers(\Elgg\Event $event) {
'query' => $event->getParam('query'),
'limit' => $event->getParam('limit'),
'type' => 'user',
'subtype' => 'user',
];

$users = elgg_search($user_options);
Expand All @@ -300,6 +301,7 @@ public static function getAutocompleteUsers(\Elgg\Event $event) {
]),
'href' => elgg_generate_url('default:search', [
'entity_type' => 'user',
'entity_subtype' => 'user',
'search_type' => 'entities',
'q' => $event->getParam('query'),
]),
Expand Down Expand Up @@ -341,6 +343,7 @@ public static function getAutocompleteGroups(\Elgg\Event $event) {
'query' => $event->getParam('query'),
'limit' => $event->getParam('limit'),
'type' => 'group',
'subtype' => 'group',
];

$groups = elgg_search($group_options);
Expand All @@ -364,6 +367,7 @@ public static function getAutocompleteGroups(\Elgg\Event $event) {
]),
'href' => elgg_generate_url('default:search', [
'entity_type' => 'group',
'entity_subtype' => 'group',
'search_type' => 'entities',
'q' => $event->getParam('query'),
]),
Expand Down

0 comments on commit accccf2

Please sign in to comment.