* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: search.php,v 1.35 2004-10-25 12:48:02 x2000habouzit Exp $
+ $Id: search.php,v 1.36 2004-10-25 20:27:52 x2000habouzit Exp $
***************************************************************************/
require("auto.prepend.inc.php");
$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() && !$firstnameField->length()
+ && empty($_REQUEST['promo1']) && empty($_REQUEST['promo2'])
+ && !$_REQUEST['woman'])
+ {
+ new ThrowError('Recherche trop générale.');
+ }
$offset = new NumericSField('offset');
$sql = 'SELECT SQL_CALC_FOUND_ROWS