[SPIP] +spip v3.0.17
[lhc/web/clavette_www.git] / www / plugins-dist / urls_etendues / action / urls_liberer.php
diff --git a/www/plugins-dist/urls_etendues/action/urls_liberer.php b/www/plugins-dist/urls_etendues/action/urls_liberer.php
new file mode 100644 (file)
index 0000000..297aecd
--- /dev/null
@@ -0,0 +1,33 @@
+<?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;
+
+// http://doc.spip.org/@action_instituer_syndic_article_dist
+function action_urls_liberer_dist() {
+
+       $securiser_action = charger_fonction('securiser_action', 'inc');
+       $arg = $securiser_action();
+
+       include_spip('inc/autoriser');
+       if (autoriser('modifier',$type,$id)){
+               $arg = explode('-',$arg);
+               $type = array_shift($arg);
+               $id = array_shift($arg);
+               $url = implode('-',$arg);
+
+               include_spip('action/editer_url');
+               url_delete($type, $id, $url);
+       }
+}
+
+?>