From 22d6b011ac517a37d9bf35d2aa9e4176d16c5a84 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Sat, 13 Nov 2004 11:02:47 +0000 Subject: [PATCH] 50% for FS#195 --- include/search.classes.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/search.classes.inc.php b/include/search.classes.inc.php index 1643923..66b456c 100644 --- a/include/search.classes.inc.php +++ b/include/search.classes.inc.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: search.classes.inc.php,v 1.30 2004-11-04 13:50:45 x2000habouzit Exp $ + $Id: search.classes.inc.php,v 1.31 2004-11-13 11:02:47 x2000habouzit Exp $ ***************************************************************************/ require_once("xorg.misc.inc.php"); @@ -160,7 +160,10 @@ class QuickSearch extends SField { function get_where_statement() { $where = Array(); - foreach($this->strings as $s) { + if(count($this->strings) == 1) { + $s = $this->strings[0]; + $where[] = "(r.nom LIKE '%$s%' OR r.epouse LIKE '%$s%')"; + } else foreach($this->strings as $s) { $where[] = "(r.nom LIKE '%$s%' OR r.epouse LIKE '%$s%' OR r.prenom LIKE '%$s%')"; } -- 2.1.4