mirror of
https://github.com/flarum/framework.git
synced 2025-02-06 15:25:16 +08:00
Fix Index content, only use search when applicable.
This commit is contained in:
parent
38dc12ef0d
commit
2f0192d47d
|
@ -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');
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user