aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Search
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-08-04 18:15:09 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-08-05 11:37:45 +0200
commitd98f7c1bd83fc03fd297ebeac6279ffe17316950 (patch)
tree4f1f261e1033f441a0deaa30f5aeb56cbbb51c43 /lib/private/Search
parent71b62c4203a25beefeab73f73668919c813e3a50 (diff)
downloadnextcloud-server-d98f7c1bd83fc03fd297ebeac6279ffe17316950.tar.gz
nextcloud-server-d98f7c1bd83fc03fd297ebeac6279ffe17316950.zip
Make apps handle the order logic
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'lib/private/Search')
-rw-r--r--lib/private/Search/SearchComposer.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/Search/SearchComposer.php b/lib/private/Search/SearchComposer.php
index 7ba6296c9de..f86626909c4 100644
--- a/lib/private/Search/SearchComposer.php
+++ b/lib/private/Search/SearchComposer.php
@@ -109,17 +109,19 @@ class SearchComposer {
* Get a list of all provider IDs & Names for the consecutive calls to `search`
* Sort the list by the order property
*
+ * @param string $from the url the user is currently at
+ *
* @return array
*/
- public function getProviders(): array {
+ public function getProviders(string $from): array {
$this->loadLazyProviders();
$providers = array_values(
- array_map(function (IProvider $provider) {
+ array_map(function (IProvider $provider) use ($from) {
return [
'id' => $provider->getId(),
'name' => $provider->getName(),
- 'order' => $provider->getOrder()
+ 'order' => $provider->getOrder($from)
];
}, $this->providers)
);