From 7845dbfe701e625b5fb222f8b55fea0afa4058d8 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Tue, 28 Mar 2017 13:50:07 +0000 Subject: [PATCH] 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 --- fts.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fts.php b/fts.php index 784fc57..17a040c 100644 --- a/fts.php +++ b/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 ();