|
@@ -69,7 +69,7 @@ discard block |
|
|
block discarded – undo |
|
69
|
69
|
public function get($search, $itemType, $itemId, $sorter = null, $shareTypes = [Share::SHARE_TYPE_USER], $limit = 10): DataResponse { |
|
70
|
70
|
// if enumeration/user listings are disabled, we'll receive an empty |
|
71
|
71
|
// result from search() – thus nothing else to do here. |
|
72
|
|
- [$results,] = $this->collaboratorSearch->search($search, $shareTypes, false, $limit, 0); |
|
|
72
|
+ [$results, ] = $this->collaboratorSearch->search($search, $shareTypes, false, $limit, 0); |
|
73
|
73
|
|
|
74
|
74
|
$event = new AutoCompleteEvent([ |
|
75
|
75
|
'search' => $search, |
|
@@ -80,14 +80,14 @@ discard block |
|
|
block discarded – undo |
|
80
|
80
|
'shareTypes' => $shareTypes, |
|
81
|
81
|
'limit' => $limit, |
|
82
|
82
|
]); |
|
83
|
|
- $this->dispatcher->dispatch(IManager::class . '::filterResults', $event); |
|
|
83
|
+ $this->dispatcher->dispatch(IManager::class.'::filterResults', $event); |
|
84
|
84
|
$results = $event->getResults(); |
|
85
|
85
|
|
|
86
|
86
|
$exactMatches = $results['exact']; |
|
87
|
87
|
unset($results['exact']); |
|
88
|
88
|
$results = array_merge_recursive($exactMatches, $results); |
|
89
|
89
|
|
|
90
|
|
- if($sorter !== null) { |
|
|
90
|
+ if ($sorter !== null) { |
|
91
|
91
|
$sorters = array_reverse(explode('|', $sorter)); |
|
92
|
92
|
$this->autoCompleteManager->runSorters($sorters, $results, [ |
|
93
|
93
|
'itemType' => $itemType, |