[SPIP] v3.0.22-->v3.0.24
[lhc/web/www.git] / www / plugins-dist / medias / action / editer_document.php
index e16a562..6ed20fa 100644 (file)
@@ -3,7 +3,7 @@
 /***************************************************************************\
  *  SPIP, Systeme de publication pour l'internet                           *
  *                                                                         *
- *  Copyright (c) 2001-2014                                                *
+ *  Copyright (c) 2001-2016                                                *
  *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
  *                                                                         *
  *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
@@ -126,6 +126,7 @@ function document_modifier($id_document, $set=false) {
        if ($champs['fichier'] // un plugin a pu interdire la modif du fichier en virant le champ
         AND $ancien_fichier // on avait bien note le nom du fichier avant la modif
         AND $ancien_fichier!==$champs['fichier'] // et il a ete modifie
+        AND !tester_url_absolue($ancien_fichier)
         AND @file_exists($f = get_spip_doc($ancien_fichier)))
                spip_unlink($f);