mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-16 06:31:21 +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 .= ' AND ';
|
||||||
$querystr .= '(path:';
|
$querystr .= '(path:';
|
||||||
$querystr .= str_replace(':', 'x', $fields['rootFolder']->getFolderList().$fields['rootFolder']->getID().':');
|
$querystr .= str_replace(':', 'x', $fields['rootFolder']->getFolderList().$fields['rootFolder']->getID().':');
|
||||||
$querystr .= ')';
|
$querystr .= '*)';
|
||||||
}
|
}
|
||||||
if(!empty($fields['startFolder']) && $fields['startFolder']->getFolderList()) {
|
if(!empty($fields['startFolder']) && $fields['startFolder']->getFolderList()) {
|
||||||
if($querystr)
|
if($querystr)
|
||||||
$querystr .= ' AND ';
|
$querystr .= ' AND ';
|
||||||
$querystr .= '(path:';
|
$querystr .= '(path:';
|
||||||
$querystr .= str_replace(':', 'x', $fields['startFolder']->getFolderList().$fields['startFolder']->getID().':');
|
$querystr .= str_replace(':', 'x', $fields['startFolder']->getFolderList().$fields['startFolder']->getID().':');
|
||||||
$querystr .= ')';
|
$querystr .= '*)';
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$result = $this->index->find($querystr, $limit);
|
$result = $this->index->find($querystr, $limit);
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
<notes>
|
<notes>
|
||||||
- throw exeption in find() instead of returning false
|
- throw exeption in find() instead of returning false
|
||||||
|
- fix query if rootFolder or startFolder is set
|
||||||
</notes>
|
</notes>
|
||||||
<contents>
|
<contents>
|
||||||
<dir baseinstalldir="SeedDMS" name="/">
|
<dir baseinstalldir="SeedDMS" name="/">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user