search even if query is empty

This commit is contained in:
Uwe Steinmann 2020-09-14 09:33:30 +02:00
parent b47e53637d
commit 95b01544f3

View File

@ -143,7 +143,9 @@ class SeedDMS_SQLiteFTS_Indexer {
if(!$this->_conn)
return false;
$sql = "SELECT docid FROM docs WHERE docs MATCH ".$this->_conn->quote($query);
$sql = "SELECT docid FROM docs";
if($query)
$sql .= " WHERE docs MATCH ".$this->_conn->quote($query);
$res = $this->_conn->query($sql);
$hits = array();
if($res) {