Merge pull request #18263 from nextcloud/fix/search/limit_to_home_limit
Fix search limit to home
This commit is contained in:
commit
905cd37626
|
@ -797,6 +797,10 @@ class Cache implements ICache {
|
||||||
$query->andWhere($searchExpr);
|
$query->andWhere($searchExpr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($searchQuery->limitToHome() && ($this instanceof HomeCache)) {
|
||||||
|
$query->andWhere($builder->expr()->like('path', $query->expr()->literal('files/%')));
|
||||||
|
}
|
||||||
|
|
||||||
$this->querySearchHelper->addSearchOrdersToQuery($query, $searchQuery->getOrder());
|
$this->querySearchHelper->addSearchOrdersToQuery($query, $searchQuery->getOrder());
|
||||||
|
|
||||||
if ($searchQuery->getLimit()) {
|
if ($searchQuery->getLimit()) {
|
||||||
|
|
Loading…
Reference in New Issue