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 function action_exporter_bookmarks_dist($arg=null){
18 $securiser_action = charger_fonction('securiser_action', 'inc');
19 $arg = $securiser_action();
22 if (autoriser('exporter','_bookmarks')){
23 list($id_parent,$exporter_publie_seulement,$exporter_avec_mots_cles) = explode("-",$arg);
24 $statut = ($exporter_publie_seulement?
array('publie'):array('prop','publie'));
26 $f = "bookmarks-".date('Y-m-d').".html";
27 header('Content-Type: text/html');
28 header("Content-Disposition: attachment; filename=\"$f\";");
29 header("Content-Transfer-Encoding: 8bit");
31 // fix for IE catching or PHP bug issue
32 header("Pragma: public");
33 header("Expires: 0"); // set expiration time
34 header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
35 echo recuperer_fond("prive/transmettre/bookmarks",array('statut'=>$statut,'id_parent'=>intval($id_parent),'tags'=>$exporter_avec_mots_cles));