X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Finc%2Fjoindre.php;h=b64692b96fb9aad6138ac58ec310fd40ddc88fb9;hp=80012975d53ba4484f7a767cace821d4e592033a;hb=e99f0878011913365e49b30d90e496c24c301393;hpb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed diff --git a/www/ecrire/inc/joindre.php b/www/ecrire/inc/joindre.php index 8001297..b64692b 100644 --- a/www/ecrire/inc/joindre.php +++ b/www/ecrire/inc/joindre.php @@ -3,7 +3,7 @@ /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * - * Copyright (c) 2001-2011 * + * Copyright (c) 2001-2014 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * @@ -143,7 +143,9 @@ function texte_upload_manuel($dir, $mode = 'document') { foreach ($fichiers as $f) { $f = preg_replace(",^$dir,",'',$f); - if (preg_match(",\.([^.]+)$,", $f, $match)) { + if (!preg_match(",\.([^.]+)$,", $f, $match)) + if (strtolower($f) === 'makefile') $match = array(0,'txt'); + if ($match) { $ext = strtolower($match[1]); if (!isset($exts[$ext])) { include_spip('inc/ajouter_documents');