3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2016 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
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 \***************************************************************************/
13 if (!defined("_ECRIRE_INC_VERSION")) return;
15 function action_supprimer_url_dist($arg=null) {
18 // Rien a faire ici pour le moment
19 $securiser_action = charger_fonction('securiser_action', 'inc');
20 $arg = $securiser_action();
22 if (strncmp($arg,"-1-",3)==0){
24 $url = substr($arg,3);
27 $arg = explode('-',$arg);
28 $id_parent = array_shift($arg);
29 $url = implode('-',$arg);
32 $where = 'id_parent='.intval($id_parent)." AND url=".sql_quote($url);
33 if($row = sql_fetsel('*','spip_urls',$where)){
35 if (autoriser('modifierurl',$row['type'],$row['id_objet'])){
36 sql_delete('spip_urls',$where);
39 spip_log('supprimer sans autorisation l\'URL '.$id_parent."://".$url,"urls."._LOG_ERREUR
);
43 spip_log('Impossible de supprimer une URL inconnue '.$id_parent."://".$url,"urls."._LOG_INFO_IMPORTANTE
);