3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2014 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) return;
15 # gerer un charset minimaliste en convertissant tout en unicode &#xxx;
17 // http://doc.spip.org/@exec_rechercher_auteur_dist
18 function exec_rechercher_auteur_dist()
20 exec_rechercher_auteur_args(_request('idom'));
23 // http://doc.spip.org/@exec_rechercher_auteur_args
24 function exec_rechercher_auteur_args($idom)
26 if (!preg_match('/\w+/',$idom))
28 include_spip('inc/minipres');
31 include_spip('inc/actions');
32 $where = preg_split(",\s+,", _request('nom'));
34 foreach ($where as $k => $v)
35 $where[$k] = "'%" . substr(str_replace("%","\%", sql_quote($v)),1,-1) . "%'";
36 $where= ("(nom LIKE " . join(" AND nom LIKE ", $where) . ")");
38 include_spip('inc/selectionner_auteur');
39 ajax_retour(selectionner_auteur_boucle($where, $idom));