source: spip-zone/_plugins_/import_ics/action/supprimer_almanach.php @ 73901

Last change on this file since 73901 was 73901, checked in by amaury.adon@…, 7 years ago

Ajout de l'action de suppression d'un almanach.
Reste à voir comment supprimer les événements associés.

File size: 577 bytes
Line 
1<?php
2
3if (!defined("_ECRIRE_INC_VERSION")) return;
4
5function action_supprimer_almanach_dist() {
6        $securiser_action = charger_fonction('securiser_action', 'inc');
7        $arg = $securiser_action();
8
9        if (!preg_match(",^(\d+)$,", $arg, $r)) {
10                 spip_log("action_supprimer_almanach_dist $arg pas compris");
11        } else {
12                action_supprimer_almanach_post($r[1]);
13        }
14}
15
16function action_supprimer_almanach_post($id_almanach) {
17        sql_delete("spip_almanachs", "id_almanach=" . sql_quote($id_almanach));
18
19        include_spip('inc/invalideur');
20        suivre_invalideur("id='id_almanach/$id_almanach'");
21}
22?>
Note: See TracBrowser for help on using the repository browser.