diff options
Diffstat (limited to 'apps/dav/lib/Files/FileSearchBackend.php')
-rw-r--r-- | apps/dav/lib/Files/FileSearchBackend.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php index 6c1f279c6bd..751580eabfc 100644 --- a/apps/dav/lib/Files/FileSearchBackend.php +++ b/apps/dav/lib/Files/FileSearchBackend.php @@ -2,7 +2,9 @@ /** * @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl> * + * @author Christian <16852529+cviereck@users.noreply.github.com> * @author Robin Appelman <robin@icewind.nl> + * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version * @@ -17,7 +19,7 @@ * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ @@ -273,6 +275,7 @@ class FileSearchBackend implements ISearchBackend { // TODO offset $limit = $query->limit; $orders = array_map([$this, 'mapSearchOrder'], $query->orderBy); + $offset = 0; $limitHome = false; $ownerProp = $this->extractWhereValue($query->where, FilesPlugin::OWNER_ID_PROPERTYNAME, Operator::OPERATION_EQUAL); @@ -282,12 +285,13 @@ class FileSearchBackend implements ISearchBackend { } else { throw new \InvalidArgumentException("Invalid search value for '{http://owncloud.org/ns}owner-id', only the current user id is allowed"); } + $offset = $limit->firstResult; } return new SearchQuery( $this->transformSearchOperation($query->where), (int)$limit->maxResults, - 0, + $offset, $orders, $this->user, $limitHome |