fts: do not query the database if there is no clause to search

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3473 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-03-28 13:50:07 +00:00
parent 28d61e1517
commit 7845dbfe70

View File

@@ -76,6 +76,8 @@ class fts
public function searchSQL ($query, $dblayeroo, $fields) public function searchSQL ($query, $dblayeroo, $fields)
{ {
$regexes = $this->search ($query); $regexes = $this->search ($query);
if (empty ($regexes["operator"]))
return array ();
// Clone the object to not modify a previously defined query // Clone the object to not modify a previously defined query
$dbl = clone $dblayeroo; $dbl = clone $dblayeroo;
$dbl->clearRequest (); $dbl->clearRequest ();