X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=www%2Fplugins-dist%2Fsites%2Faction%2Fexporter_bookmarks.php;h=9bcb3266a94952d5613741200e40e3760c008907;hb=4f443dce95ff6f8221c189880a70c74ce1c1f238;hp=c4418b2183c388cc26f34f91e6904fe13f112e08;hpb=4a628e9b277d3617535f99d663ca79fa2e891177;p=lhc%2Fweb%2Fwww.git diff --git a/www/plugins-dist/sites/action/exporter_bookmarks.php b/www/plugins-dist/sites/action/exporter_bookmarks.php index c4418b21..9bcb3266 100644 --- a/www/plugins-dist/sites/action/exporter_bookmarks.php +++ b/www/plugins-dist/sites/action/exporter_bookmarks.php @@ -10,20 +10,22 @@ * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ -if (!defined("_ECRIRE_INC_VERSION")) return; +if (!defined("_ECRIRE_INC_VERSION")) { + return; +} -function action_exporter_bookmarks_dist($arg=null){ +function action_exporter_bookmarks_dist($arg = null) { - if (is_null($arg)){ + if (is_null($arg)) { $securiser_action = charger_fonction('securiser_action', 'inc'); $arg = $securiser_action(); } - if (autoriser('exporter','_bookmarks')){ - list($id_parent,$exporter_publie_seulement,$exporter_avec_mots_cles) = explode("-",$arg); - $statut = ($exporter_publie_seulement?array('publie'):array('prop','publie')); + if (autoriser('exporter', '_sites')) { + list($id_parent, $exporter_publie_seulement, $exporter_avec_mots_cles) = explode("-", $arg); + $statut = ($exporter_publie_seulement ? array('publie') : array('prop', 'publie')); - $f = "bookmarks-".date('Y-m-d').".html"; + $f = "bookmarks-" . date('Y-m-d') . ".html"; header('Content-Type: text/html'); header("Content-Disposition: attachment; filename=\"$f\";"); header("Content-Transfer-Encoding: 8bit"); @@ -32,6 +34,7 @@ function action_exporter_bookmarks_dist($arg=null){ header("Pragma: public"); header("Expires: 0"); // set expiration time header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); - echo recuperer_fond("prive/transmettre/bookmarks",array('statut'=>$statut,'id_parent'=>intval($id_parent),'tags'=>$exporter_avec_mots_cles)); + echo recuperer_fond("prive/transmettre/bookmarks", + array('statut' => $statut, 'id_parent' => intval($id_parent), 'tags' => $exporter_avec_mots_cles)); } -} \ No newline at end of file +}