From 50e8c8493267b05d9bdd7dc467f1ebfff8078c30 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 24 Jun 2021 11:38:04 +0200 Subject: [PATCH] use findById instead of find in getDocument() and getFolder() --- SeedDMS_SQLiteFTS/SQLiteFTS/Search.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php index 77b3993f6..20381d1a8 100644 --- a/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php +++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php @@ -45,23 +45,23 @@ class SeedDMS_SQliteFTS_Search { /** * Get document from index * - * @param int $id real document id + * @param int $id id of seeddms document * @return object instance of SeedDMS_SQliteFTS_QueryHit or false */ function getDocument($id) { /* {{{ */ - $hits = $this->index->find('D'.$id); - return $hits['hits'] ? $hits['hits'][0] : false; + $hits = $this->index->findById('D'.$id); + return $hits ? $hits[0] : false; } /* }}} */ /** * Get folder from index * - * @param int $id real folder id + * @param int $id id of seeddms folder * @return object instance of SeedDMS_SQliteFTS_QueryHit or false */ function getFolder($id) { /* {{{ */ - $hits = $this->index->find('F'.$id); - return $hits['hits'] ? $hits['hits'][0] : false; + $hits = $this->index->findById('F'.$id); + return $hits ? $hits[0] : false; } /* }}} */ /**