From: x2000habouzit Date: Sat, 9 Oct 2004 18:18:58 +0000 (+0000) Subject: fixes for the advanced search X-Git-Tag: xorg/old~1355 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ce69e52c495797bbbb05c2c6afcfcbc637b43b5c;p=platal.git fixes for the advanced search --- diff --git a/htdocs/advanced_search.php b/htdocs/advanced_search.php index c146fc7..6a93288 100644 --- a/htdocs/advanced_search.php +++ b/htdocs/advanced_search.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: advanced_search.php,v 1.8 2004-10-09 17:55:18 x2000habouzit Exp $ + $Id: advanced_search.php,v 1.9 2004-10-09 18:18:58 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -49,7 +49,7 @@ if (array_key_exists('rechercher', $_REQUEST)) { $countryField = new RefSField('pays',array('ap.pays'),'adresses','ap','u.user_id=ap.uid'); $regionField = new RefSField('region',array('ar.region'),'adresses','ar','u.user_id=ar.uid'); - $entrepriseField = new RefSField('enteprise',array('ee.entreprise'),'entreprises','ee','u.user_id=ee.uid',false); + $entrepriseField = new RefSField('entreprise',array('ee.entreprise'),'entreprises','ee','u.user_id=ee.uid',false); $posteField = new RefSField('poste',array('ep.fonction'),'entreprises','ep','u.user_id=ep.uid'); $secteurField = new RefSField('secteur',array('es.secteur'),'entreprises','es','u.user_id=es.uid'); $cvField = new RefSField('cv',array('u.cv'),'','','',false); @@ -83,7 +83,8 @@ if (array_key_exists('rechercher', $_REQUEST)) { ad0.text AS app0text, ad0.url AS app0url, ai0.type AS app0type, ad1.text AS app1text, ad1.url AS app1url, ai1.type AS app1type, c.uid AS contact - FROM auth_user_md5 AS u '.$fields->get_select_statement().' + FROM auth_user_md5 AS u + '.$fields->get_select_statement().' INNER JOIN aliases AS a ON (u.user_id = a.id AND a.type="a_vie") INNER JOIN identification AS i ON (i.matricule=u.matricule) LEFT JOIN contacts AS c ON (c.uid='.((array_key_exists('uid',$_SESSION))?$_SESSION['uid']:0).' AND c.contact=u.user_id) diff --git a/templates/search.tpl b/templates/search.tpl index 47139a6..4f5b1a4 100644 --- a/templates/search.tpl +++ b/templates/search.tpl @@ -17,10 +17,13 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: search.tpl,v 1.12 2004-08-31 22:21:05 x2000habouzit Exp $ + $Id: search.tpl,v 1.13 2004-10-09 18:18:58 x2000habouzit Exp $ ***************************************************************************} {dynamic} + +{if $nb_resultats_total >= 600}{assign var='error' value="Recherche trop générale."}{/if} + {if $formulaire==0 and !$error}
Résultats