mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
fix query if rootFolder or startFolder is set
This commit is contained in:
parent
12e9a803bc
commit
89c6dc580a
|
@ -130,14 +130,14 @@ class SeedDMS_SQliteFTS_Search {
|
|||
$querystr .= ' AND ';
|
||||
$querystr .= '(path:';
|
||||
$querystr .= str_replace(':', 'x', $fields['rootFolder']->getFolderList().$fields['rootFolder']->getID().':');
|
||||
$querystr .= ')';
|
||||
$querystr .= '*)';
|
||||
}
|
||||
if(!empty($fields['startFolder']) && $fields['startFolder']->getFolderList()) {
|
||||
if($querystr)
|
||||
$querystr .= ' AND ';
|
||||
$querystr .= '(path:';
|
||||
$querystr .= str_replace(':', 'x', $fields['startFolder']->getFolderList().$fields['startFolder']->getID().':');
|
||||
$querystr .= ')';
|
||||
$querystr .= '*)';
|
||||
}
|
||||
try {
|
||||
$result = $this->index->find($querystr, $limit);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
- throw exeption in find() instead of returning false
|
||||
- fix query if rootFolder or startFolder is set
|
||||
</notes>
|
||||
<contents>
|
||||
<dir baseinstalldir="SeedDMS" name="/">
|
||||
|
|
Loading…
Reference in New Issue
Block a user