From: x2000habouzit Date: Mon, 25 Oct 2004 12:48:02 +0000 (+0000) Subject: some improvements for search X-Git-Tag: xorg/old~1175 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=df02fbd87abfea66a37bbbcde881da852af34317;p=platal.git some improvements for search --- diff --git a/htdocs/search.php b/htdocs/search.php index a04f024..1c030f4 100644 --- a/htdocs/search.php +++ b/htdocs/search.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: search.php,v 1.34 2004-10-25 12:41:04 x2000habouzit Exp $ + $Id: search.php,v 1.35 2004-10-25 12:48:02 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -53,11 +53,6 @@ if (array_key_exists('rechercher', $_REQUEST)) { $womanField = new RefSField('woman',array('FIND_IN_SET(i.flags,\'femme\')+1'),'','',''); $fields = new SFieldGroup(true,array($nameField,$firstnameField,$promo1Field,$promo2Field,$womanField)); - if ($nameField->length()<2 && $firstnameField->length()<2 && - (!logged() || !$promo1Field->is_a_single_promo())) - { - new ThrowError('Recherche trop générale.'); - } $offset = new NumericSField('offset'); $sql = 'SELECT SQL_CALC_FOUND_ROWS diff --git a/templates/search.form.tpl b/templates/search.form.tpl index e3b55b7..6e95266 100644 --- a/templates/search.form.tpl +++ b/templates/search.form.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: search.form.tpl,v 1.22 2004-10-25 12:41:05 x2000habouzit Exp $ + $Id: search.form.tpl,v 1.23 2004-10-25 12:48:02 x2000habouzit Exp $ ***************************************************************************}

@@ -56,15 +56,15 @@  ET  @@ -72,9 +72,9 @@ Sexe - Homme ou femme  - Homme  - Femme + Homme ou femme  + Homme  + Femme {if $advanced eq "1"}