33 lines
670 B
PHP
33 lines
670 B
PHP
<?php
|
|
if (!defined('_ECRIRE_INC_VERSION')) return;
|
|
|
|
/**
|
|
* supprimer un slug Gamumail
|
|
*
|
|
* @plugin GamuMail
|
|
*
|
|
* @copyright 2020
|
|
* @author cy_altern
|
|
* @licence GNU/GPL
|
|
*
|
|
**/
|
|
|
|
include_spip('inc/autoriser');
|
|
|
|
function action_supprimer_slug_dist(){
|
|
include_spip('inc/autoriser');
|
|
if (!autoriser('supprimer','gamumail')) {
|
|
return false;
|
|
}
|
|
|
|
$securiser_action = charger_fonction('securiser_action', 'inc');
|
|
$arg = $securiser_action();
|
|
$id_gamumail = intval($arg);
|
|
if ($id_gamumail) {
|
|
sql_delete('spip_gamumails','id_gamumail ='.$id_gamumail);
|
|
}
|
|
|
|
// Cache
|
|
include_spip('inc/invalideur');
|
|
suivre_invalideur("id='id_gamumail/$id_gamumail'");
|
|
}
|