Last change
on this file since 48815 was
48815,
checked in by n.pavot@…, 10 years ago
|
On peut désormais lier une ou plusieurs organisations à une rubrique, directement à partir de la vue de la rubrique dans l'espace privé.
|
File size:
1.0 KB
|
Line | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * Plugin Contacts & Organisations |
---|
4 | * Licence GPL (c) 2010 Matthieu Marcillaud, Cyril Marion, Nadine Pavot |
---|
5 | **/ |
---|
6 | |
---|
7 | if (!defined("_ECRIRE_INC_VERSION")) return; |
---|
8 | |
---|
9 | function action_delier_rubrique_dist($arg=null) { |
---|
10 | if (is_null($arg)){ |
---|
11 | $securiser_action = charger_fonction('securiser_action', 'inc'); |
---|
12 | $arg = $securiser_action(); |
---|
13 | } |
---|
14 | $arg = explode('/', $arg); |
---|
15 | |
---|
16 | if (intval($arg[0]) and intval($arg[1])) { |
---|
17 | action_delier_rubrique_post($arg[0], $arg[1]); |
---|
18 | } |
---|
19 | |
---|
20 | else { |
---|
21 | spip_log("action_delier_rubrique_post $arg pas compris"); |
---|
22 | } |
---|
23 | } |
---|
24 | |
---|
25 | function action_delier_rubrique_post($id_rubrique, $id_organisation) { |
---|
26 | $id_rubrique = intval($id_rubrique); |
---|
27 | $id_organisation = intval($id_organisation); |
---|
28 | if ($id_rubrique && $id_organisation) { |
---|
29 | sql_delete("spip_organisations_liens", array( |
---|
30 | "id_organisation=" . sql_quote($id_organisation), |
---|
31 | "id_objet=" . sql_quote($id_rubrique), |
---|
32 | "objet='rubrique'" |
---|
33 | )); |
---|
34 | |
---|
35 | include_spip('inc/invalideur'); |
---|
36 | suivre_invalideur("id='id_rubrique/$id_rubrique'"); |
---|
37 | } |
---|
38 | } |
---|
39 | |
---|
40 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.