Fix search limit to home

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-12-06 11:29:14 +01:00
parent bb8ac6ca34
commit 5dba8d318d
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 4 additions and 0 deletions

View File

@ -797,6 +797,10 @@ class Cache implements ICache {
$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());
if ($searchQuery->getLimit()) {