$page->changeTpl('geoloc/index.tpl');
$fields = new SFieldGroup(true, advancedSearchFromInput());
$search = str_replace('&','&',$fields->get_url());
- if (!Env::has('only_current'))
+ if ((!Env::has('only_current') && !Env::has('rechercher')) || Env::i('only_current') == 'on')
$search .= '&only_current=on';
elseif (Env::i('only_current') != 'on')
$search .= '&only_current=';
if ($where) $where = "WHERE ".$where;
$users = XDB::iterator("
- SELECT u.user_id AS id, u.prenom, u.nom, u.promo
+ SELECT u.user_id AS id, u.prenom, u.nom, u.promo, alias
FROM adresses AS a
INNER JOIN auth_user_md5 AS u ON(u.user_id = a.uid)
INNER JOIN auth_user_quick AS q ON(q.user_id = a.uid)
+ LEFT JOIN aliases ON(u.user_id = aliases.id AND FIND_IN_SET(aliases.flags,'bestalias'))
".$fields->get_select_statement()."
".$where."
GROUP BY u.user_id LIMIT 11", $id);