Commit | Line | Data |
---|---|---|
c495c100 P |
1 | <?php |
2 | ||
3 | /***************************************************************************\ | |
4 | * SPIP, Systeme de publication pour l'internet * | |
5 | * * | |
6 | * Copyright (c) 2001-2007 * | |
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/@action_instituer_rubrique_breves_dist | |
16 | function action_instituer_rubrique_breves_dist() { | |
17 | ||
18 | $securiser_action = charger_fonction('securiser_action', 'inc'); | |
19 | $arg = $securiser_action(); | |
20 | ||
21 | list($id, $statut) = preg_split('/\W/', $arg); | |
22 | $id = intval($id); | |
23 | ||
24 | include_spip('action/editer_breve'); | |
25 | ||
26 | $table = 'articles'; | |
27 | $key = 'id_article'; | |
28 | ||
29 | $voss = spip_query("SELECT $key AS id FROM spip_$table WHERE id_rubrique=$id AND (statut = 'publie' OR statut = 'prop')"); | |
30 | ||
31 | while($row = spip_fetch_array($voss)) { | |
32 | set_request('statut', $statut); | |
33 | revisions_breves($row['id']); | |
34 | } | |
35 | ||
36 | redirige_par_entete(generer_url_ecrire('meme_rubrique', "id=$id&type=breve&order=date_heure", true)); | |
37 | } | |
38 | ?> |