- $globals->search->result_fields .="
- IF(q.profile_web_pub='public', q.profile_web, '') AS web,
- IF(q.profile_mobile_pub='public', q.profile_mobile, '') AS mobile,
- IF(q.profile_freetext_pub='public', q.profile_freetext, '') AS freetext,
- IF(adr.pub='public', adr.city, '') AS city,
- IF(adr.pub='public', gp.pays, '') AS countrytxt,
- IF(adr.pub='public', gr.name, '') AS region,
- IF(e.pub='public', e.entreprise, '') AS entreprise,";
-$globals->search->result_where_statement = '
- LEFT JOIN applis_ins AS ai0 ON (u.user_id = ai0.uid AND ai0.ordre = 0)
- LEFT JOIN applis_def AS ad0 ON (ad0.id = ai0.aid)
- LEFT JOIN applis_ins AS ai1 ON (u.user_id = ai1.uid AND ai1.ordre = 1)
- LEFT JOIN applis_def AS ad1 ON (ad1.id = ai1.aid)
- LEFT JOIN entreprises AS e ON (e.entrid = 0 AND e.uid = u.user_id)
- LEFT JOIN emploi_secteur AS es ON (e.secteur = es.id)
- LEFT JOIN fonctions_def AS ef ON (e.fonction = ef.id)
- LEFT JOIN geoloc_pays AS n ON (u.nationalite = n.a2)
- LEFT JOIN adresses AS adr ON (u.user_id = adr.uid AND FIND_IN_SET(\'active\',adr.statut))
- LEFT JOIN geoloc_pays AS gp ON (adr.country = gp.a2)
- LEFT JOIN geoloc_region AS gr ON (adr.country = gr.a2 AND adr.region = gr.region)
- LEFT JOIN emails AS em ON (em.uid = u.user_id AND em.flags = \'active\')';
-
-// }}}
-// {{{ function display_lines()
-
-/**
- * This function is a heuristic that approximatively tells
- * how many lines of output the contact list will use.
- */
-function display_lines($text)
-{
- $n = 0;
- $tokens = Array('<tr>', '<div class="nom">');
- foreach ($tokens as $t) {
- $i = -1;
- while ( ($i = strpos($text,$t,$i+1))!==false) { $n++; }
- }
- return $n;
-}
+ $globals->search->result_fields .="
+ IF(q.profile_web_pub='public', q.profile_web, '') AS web,
+ IF(q.profile_mobile_pub='public', q.profile_mobile, '') AS mobile,
+ IF(q.profile_freetext_pub='public', q.profile_freetext, '') AS freetext,
+ IF(adr.pub='public', adr.city, '') AS city,
+ IF(adr.pub='public', gp.pays, '') AS countrytxt,
+ IF(adr.pub='public', gr.name, '') AS region,
+ IF(e.pub='public', e.entreprise, '') AS entreprise,";
+@$globals->search->result_where_statement = '
+ LEFT JOIN applis_ins AS ai0 ON (u.user_id = ai0.uid AND ai0.ordre = 0)
+ LEFT JOIN applis_def AS ad0 ON (ad0.id = ai0.aid)
+ LEFT JOIN applis_ins AS ai1 ON (u.user_id = ai1.uid AND ai1.ordre = 1)
+ LEFT JOIN applis_def AS ad1 ON (ad1.id = ai1.aid)
+ LEFT JOIN entreprises AS e ON (e.entrid = 0 AND e.uid = u.user_id)
+ LEFT JOIN emploi_secteur AS es ON (e.secteur = es.id)
+ LEFT JOIN fonctions_def AS ef ON (e.fonction = ef.id)
+ LEFT JOIN geoloc_pays AS n ON (u.nationalite = n.a2)
+ LEFT JOIN adresses AS adr ON (u.user_id = adr.uid AND FIND_IN_SET(\'active\',adr.statut))
+ LEFT JOIN geoloc_pays AS gp ON (adr.country = gp.a2)
+ LEFT JOIN geoloc_region AS gr ON (adr.country = gr.a2 AND adr.region = gr.region)
+ LEFT JOIN emails AS em ON (em.uid = u.user_id AND em.flags = \'active\')';