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:
2
fts.php
2
fts.php
@@ -76,6 +76,8 @@ class fts
|
||||
public function searchSQL ($query, $dblayeroo, $fields)
|
||||
{
|
||||
$regexes = $this->search ($query);
|
||||
if (empty ($regexes["operator"]))
|
||||
return array ();
|
||||
// Clone the object to not modify a previously defined query
|
||||
$dbl = clone $dblayeroo;
|
||||
$dbl->clearRequest ();
|
||||
|
||||
Reference in New Issue
Block a user