mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 08:25:44 +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
|
* 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
|
* @return object instance of SeedDMS_SQliteFTS_QueryHit or false
|
||||||
*/
|
*/
|
||||||
function getDocument($id) { /* {{{ */
|
function getDocument($id) { /* {{{ */
|
||||||
$hits = $this->index->find('D'.$id);
|
$hits = $this->index->findById('D'.$id);
|
||||||
return $hits['hits'] ? $hits['hits'][0] : false;
|
return $hits ? $hits[0] : false;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get folder from index
|
* 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
|
* @return object instance of SeedDMS_SQliteFTS_QueryHit or false
|
||||||
*/
|
*/
|
||||||
function getFolder($id) { /* {{{ */
|
function getFolder($id) { /* {{{ */
|
||||||
$hits = $this->index->find('F'.$id);
|
$hits = $this->index->findById('F'.$id);
|
||||||
return $hits['hits'] ? $hits['hits'][0] : false;
|
return $hits ? $hits[0] : false;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user