[PLUGINS] +acces restreint
[ptitvelo/web/www.git] / www / plugins / accesrestreint_3_5 / action / retirer_zone.php
1 <?php
2 /**
3 * Plugin Acces Restreint 3.0 pour Spip 2.0
4 * Licence GPL (c) 2006-2008 Cedric Morin
5 *
6 */
7 if (!defined("_ECRIRE_INC_VERSION")) return;
8
9 function action_retirer_zone_dist(){
10 $securiser_action = charger_fonction('securiser_action','inc');
11 $arg = $securiser_action();
12
13 if (preg_match(',^([0-9]+|-1)-([a-z]+)-([0-9]+|-1)$,',$arg,$regs)){
14 $id_zone = intval($regs[1]);
15 $type = $regs[2];
16 $id_objet = intval($regs[3]);
17 include_spip('action/editer_zone');
18 if ($id_objet=='-1')
19 zone_lier($id_zone,$type,array(),'set');
20 else
21 zone_lier($id_zone,$type,$id_objet,'del');
22 }
23 }
24
25 ?>