[SPIP] v3.2.1-->v3.2.3
[lhc/web/www.git] / www / plugins-dist / sites / formulaires / exporter_sites.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 if (!defined("_ECRIRE_INC_VERSION")) {
14 return;
15 }
16
17 function formulaires_exporter_sites_charger_dist() {
18
19 if (!autoriser('exporter', '_sites')) {
20 return false;
21 }
22
23 return array(
24 'id_parent' => 0,
25 'exporter_publie_seulement' => 0,
26 'exporter_avec_mots_cles' => 1,
27 );
28 }
29
30 function formulaires_exporter_sites_traiter_dist() {
31 $id_parent = intval(_request('id_parent'));
32 $exporter_publie_seulement = _request('exporter_publie_seulement') ? 1 : 0;
33 $exporter_avec_mots_cles = _request('exporter_avec_mots_cles') ? 1 : 0;
34
35 include_spip('inc/actions');
36 $redirect = generer_action_auteur('exporter_bookmarks',
37 "$id_parent-$exporter_publie_seulement-$exporter_avec_mots_cles");
38
39 return array('redirect' => $redirect);
40 }