mirror of
https://github.com/flarum/core.git
synced 2025-08-04 07:27:39 +02:00
Fix Index content, only use search when applicable.
This commit is contained in:
@@ -75,10 +75,14 @@ class Index
|
||||
|
||||
$params = [
|
||||
'sort' => $sort && isset($sortMap[$sort]) ? $sortMap[$sort] : '',
|
||||
'filter' => compact('q'),
|
||||
'filter' => [],
|
||||
'page' => ['offset' => ($page - 1) * 20, 'limit' => 20]
|
||||
];
|
||||
|
||||
if ($q) {
|
||||
$params['filter']['q'] = $q;
|
||||
}
|
||||
|
||||
$apiDocument = $this->getApiDocument($request->getAttribute('actor'), $params);
|
||||
$defaultRoute = $this->settings->get('default_route');
|
||||
|
||||
|
Reference in New Issue
Block a user