mirror of
https://github.com/YunoHost-Apps/spip_ynh.git
synced 2024-09-03 20:25:59 +02:00
40 lines
1.5 KiB
PHP
40 lines
1.5 KiB
PHP
<?php
|
|
|
|
/***************************************************************************\
|
|
* SPIP, Systeme de publication pour l'internet *
|
|
* *
|
|
* Copyright (c) 2001-2014 *
|
|
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
|
|
* *
|
|
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
|
|
* Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
|
|
\***************************************************************************/
|
|
|
|
if (!defined("_ECRIRE_INC_VERSION")) return;
|
|
|
|
function action_supprimer_url_dist($arg=null) {
|
|
|
|
if (is_null($arg)){
|
|
// Rien a faire ici pour le moment
|
|
$securiser_action = charger_fonction('securiser_action', 'inc');
|
|
$arg = $securiser_action();
|
|
}
|
|
$arg = explode('-',$arg);
|
|
$id_parent = array_shift($arg);
|
|
$url = implode('-',$arg);
|
|
|
|
$where = 'id_parent='.intval($id_parent)." AND url=".sql_quote($url);
|
|
if($row = sql_fetsel('*','spip_urls',$where)){
|
|
|
|
if (autoriser('modifier',$row['type'],$row['id_objet'])){
|
|
sql_delete('spip_urls',$where);
|
|
}
|
|
else
|
|
spip_log('supprimer sans autorisation l\'URL '.$id_parent."://".$url,"urls."._LOG_ERREUR);
|
|
|
|
}
|
|
else
|
|
spip_log('Impossible de supprimer une URL inconnue '.$id_parent."://".$url,"urls."._LOG_INFO_IMPORTANTE);
|
|
|
|
|
|
}
|