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 // http://doc.spip.org/@exec_tourner_dist
16 function exec_tourner_dist()
18 exec_tourner_args(intval(_request('id_document')), _request('type'), intval(_request('id')));
21 // http://doc.spip.org/@exec_tourner_args
22 function exec_tourner_args($id_document, $type, $id)
24 if (!$id_document OR !($type == 'article'
25 ?
autoriser('modifier','article',$id)
26 : autoriser('publierdans','rubrique',$id))) {
27 include_spip('inc/minipres');
30 include_spip('inc/actions');
31 $tourner = charger_fonction('tourner', 'inc');
32 ajax_retour($tourner($id_document, array(), _request('script'), 'ajax', $type));