[SPIP] v3.2.1-->v3.2.2
[lhc/web/www.git] / www / ecrire / exec / plonger.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2019 *
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 /**
14 * Gestion d'affichage ajax des sous rubriques dans le mini navigateur
15 *
16 * @package SPIP\Core\Exec
17 */
18
19 if (!defined('_ECRIRE_INC_VERSION')) {
20 return;
21 }
22
23 /**
24 * Afficher en ajax les sous-rubriques d'une rubrique (composant du mini-navigateur)
25 *
26 * @uses inc_plonger_dist()
27 * @uses ajax_retour()
28 **/
29 function exec_plonger_dist() {
30 include_spip('inc/actions');
31
32 $rac = preg_replace(',[^\w\,/#&;-]+,', ' ', _request('rac'));
33 $id = intval(_request('id'));
34 $exclus = intval(_request('exclus'));
35 $col = intval(_request('col'));
36 $do = _request('do');
37 if (preg_match('/^\w*$/', $do)) {
38 if (!$do) {
39 $do = 'aff';
40 }
41
42 $plonger = charger_fonction('plonger', 'inc');
43 $r = $plonger($id, spip_htmlentities($rac), array(), $col, $exclus, $do);
44 } else {
45 $r = '';
46 }
47
48 ajax_retour($r);
49 }