mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
use findById instead of find in getDocument() and getFolder()
This commit is contained in:
parent
ec46d40194
commit
50e8c84932
|
@ -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;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user