[SPIP] ~2.1.12 -->2.1.25
[velocampus/web/www.git] / www / ecrire / exec / meme_rubrique.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2014 *
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')) return;
14
15 // http://doc.spip.org/@exec_meme_rubrique_dist
16 function exec_meme_rubrique_dist()
17 {
18 exec_meme_rubrique_args(intval(_request('id')), _request('type'), _request('order'));
19 }
20
21 // http://doc.spip.org/@exec_meme_rubrique_args
22 function exec_meme_rubrique_args($id, $type, $order)
23 {
24 if ((!autoriser('publierdans','rubrique',$id))
25 OR (!preg_match('/^[\w_-]*$/',$order))) {
26 include_spip('inc/minipres');
27 echo minipres();
28 } else {
29 $meme_rubrique = charger_fonction('meme_rubrique', 'inc');
30 // on connait pas le vrai 2e arg mais c'est pas dramatique
31 $res = $meme_rubrique($id, 0, $type, $order, NULL, true);
32 include_spip('inc/actions');
33 ajax_retour($res);
34 }
35 }
36 ?>