[SPIP] ~2.1.12 -->2.1.25
[velocampus/web/www.git] / www / ecrire / exec / grouper_mots.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2014 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
8 * *
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 \***************************************************************************/
12
13 if (!defined('_ECRIRE_INC_VERSION')) return;
14
15 include_spip('inc/actions');
16
17 // http://doc.spip.org/@exec_grouper_mots_dist
18 function exec_grouper_mots_dist()
19 {
20 exec_grouper_mots_args(intval(_request('id_groupe')));
21 }
22
23 // http://doc.spip.org/@exec_grouper_mots_args
24 function exec_grouper_mots_args($id_groupe)
25 {
26 $cpt = sql_countsel("spip_mots", "id_groupe=$id_groupe");
27 if (!$cpt) {
28 if ($cpt === NULL) {
29 include_spip('inc/minipres');
30 echo minipres();
31 } else ajax_retour('') ;
32 } else {
33 $grouper_mots = charger_fonction('grouper_mots', 'inc');
34 ajax_retour($grouper_mots($id_groupe, $cpt));
35 }
36 }
37 ?>