diff --git a/.gitattributes b/.gitattributes index 9e6b37b35f1338299e5f5e67735421f0adf60f72..9cb51db6e17786fcb4f1f6f8016f7ec901fd86c4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,12 +4,14 @@ IMG/icones/asf-dist.png -text IMG/icones/avi-dist.png -text IMG/icones/bmp-dist.png -text IMG/icones/bz2-dist.png -text -IMG/icones/css-dist.png -text IMG/icones/defaut-dist.png -text IMG/icones/doc-dist.png -text IMG/icones/eps-dist.png -text +IMG/icones/gif-dist.png -text IMG/icones/gz-dist.png -text +IMG/icones/html-dist.png -text IMG/icones/jpg-dist.png -text +IMG/icones/mid-dist.png -text IMG/icones/mov-dist.png -text IMG/icones/mp3-dist.png -text IMG/icones/mpg-dist.png -text @@ -18,11 +20,16 @@ IMG/icones/pdf-dist.png -text IMG/icones/png-dist.png -text IMG/icones/ppt-dist.png -text IMG/icones/ps-dist.png -text +IMG/icones/psd-dist.png -text IMG/icones/qt-dist.png -text +IMG/icones/ra-dist.png -text IMG/icones/ram-dist.png -text IMG/icones/rm-dist.png -text IMG/icones/rtf-dist.png -text IMG/icones/sit-dist.png -text +IMG/icones/tgz-dist.png -text +IMG/icones/tif-dist.png -text +IMG/icones/txt-dist.png -text IMG/icones/wav-dist.png -text IMG/icones/xls-dist.png -text IMG/icones/xml-dist.png -text diff --git a/IMG/icones/asf-dist.png b/IMG/icones/asf-dist.png index b0cd30174191acbbbdc46fd1d4406a84a61eb092..2333b6ba84ea91dff40438cdfe97a81b4c5e4f95 100644 Binary files a/IMG/icones/asf-dist.png and b/IMG/icones/asf-dist.png differ diff --git a/IMG/icones/avi-dist.png b/IMG/icones/avi-dist.png index 065f0b282211ce82bcffcb804dc60ade574c8c59..812955b7da793fc07c75a1aa4945f1ffdb891726 100644 Binary files a/IMG/icones/avi-dist.png and b/IMG/icones/avi-dist.png differ diff --git a/IMG/icones/css-dist.png b/IMG/icones/css-dist.png deleted file mode 100644 index 41cc592f24d72e91b90c73925516dc0985a0683a..0000000000000000000000000000000000000000 Binary files a/IMG/icones/css-dist.png and /dev/null differ diff --git a/IMG/icones/gif-dist.png b/IMG/icones/gif-dist.png new file mode 100644 index 0000000000000000000000000000000000000000..abc9411474570297c1dd16b603be7f8065d197d7 Binary files /dev/null and b/IMG/icones/gif-dist.png differ diff --git a/IMG/icones/html-dist.png b/IMG/icones/html-dist.png new file mode 100644 index 0000000000000000000000000000000000000000..63f3c9570c8ba21d675fb611f8709a1de573d9c9 Binary files /dev/null and b/IMG/icones/html-dist.png differ diff --git a/IMG/icones/mid-dist.png b/IMG/icones/mid-dist.png new file mode 100644 index 0000000000000000000000000000000000000000..10d8716af78f50f1bc22a88ed537f9d004450937 Binary files /dev/null and b/IMG/icones/mid-dist.png differ diff --git a/IMG/icones/mov-dist.png b/IMG/icones/mov-dist.png index 569727fce3160db63ddf814a6f92b35344d1fa23..6631c08c957709128509d9b7c84bb262cc1c1239 100644 Binary files a/IMG/icones/mov-dist.png and b/IMG/icones/mov-dist.png differ diff --git a/IMG/icones/mp3-dist.png b/IMG/icones/mp3-dist.png index 584c71fe21369b0bb6b1b8b9de9b1683d43abf9e..afb7e1b0a5d65b77bee7a857c3841da2aa8d8c2c 100644 Binary files a/IMG/icones/mp3-dist.png and b/IMG/icones/mp3-dist.png differ diff --git a/IMG/icones/mpg-dist.png b/IMG/icones/mpg-dist.png index f7dbd2388bbb9274e5e75b73c73177600d332a7a..03eff6a42ebd9893b09fa59efe1b5d4efbe85403 100644 Binary files a/IMG/icones/mpg-dist.png and b/IMG/icones/mpg-dist.png differ diff --git a/IMG/icones/pdf-dist.png b/IMG/icones/pdf-dist.png index 0f64e39ff770e2fe70f074821634dbd32b56e87b..175f172aa102363b86eadc386ef98ffe9431cbc2 100644 Binary files a/IMG/icones/pdf-dist.png and b/IMG/icones/pdf-dist.png differ diff --git a/IMG/icones/psd-dist.png b/IMG/icones/psd-dist.png new file mode 100644 index 0000000000000000000000000000000000000000..7e73552ed4d6531f8eb0185ad07606af7a131111 Binary files /dev/null and b/IMG/icones/psd-dist.png differ diff --git a/IMG/icones/qt-dist.png b/IMG/icones/qt-dist.png index 569727fce3160db63ddf814a6f92b35344d1fa23..6631c08c957709128509d9b7c84bb262cc1c1239 100644 Binary files a/IMG/icones/qt-dist.png and b/IMG/icones/qt-dist.png differ diff --git a/IMG/icones/ra-dist.png b/IMG/icones/ra-dist.png new file mode 100644 index 0000000000000000000000000000000000000000..0dd1f71387c86f6bd0516bd39ee1068459f50ce6 Binary files /dev/null and b/IMG/icones/ra-dist.png differ diff --git a/IMG/icones/tgz-dist.png b/IMG/icones/tgz-dist.png new file mode 100644 index 0000000000000000000000000000000000000000..de981d783ebfd24da7ae2b6be8645598a5fa3c85 Binary files /dev/null and b/IMG/icones/tgz-dist.png differ diff --git a/IMG/icones/tif-dist.png b/IMG/icones/tif-dist.png new file mode 100644 index 0000000000000000000000000000000000000000..396c1734727af9d2eab4c70d4afb69a9647f1530 Binary files /dev/null and b/IMG/icones/tif-dist.png differ diff --git a/IMG/icones/txt-dist.png b/IMG/icones/txt-dist.png new file mode 100644 index 0000000000000000000000000000000000000000..bfe4bad56cecfb2fb3dd3b1a21a0f7a79bf8f96e Binary files /dev/null and b/IMG/icones/txt-dist.png differ diff --git a/IMG/icones/xls-dist.png b/IMG/icones/xls-dist.png index cd79d28be3cbef7e0fe43d3c6a6fc4d6f2a9929e..aa92bb567dbf376b4414395917d3ec28714c40e1 100644 Binary files a/IMG/icones/xls-dist.png and b/IMG/icones/xls-dist.png differ diff --git a/ecrire/inc_base.php3 b/ecrire/inc_base.php3 index 6a61555b9ebc7ab7e0e81ca7c9610c7392a42a46..43ad47358baed6d2b6a18ec22da3690b3ee97a37 100644 --- a/ecrire/inc_base.php3 +++ b/ecrire/inc_base.php3 @@ -382,28 +382,35 @@ function creer_base() { mysql_query($query); $query = "INSERT IGNORE spip_types_documents (extension, titre) VALUES ". - "('txt', 'Document texte'), ". - "('htm', 'Fichier HTML'), ". + "('aiff', 'Fichier sonore AIFF'), ". + "('asf', 'Video Windows'), ". + "('avi', 'Video Windows'), ". + "('bz2', 'Archive BZip'), ". + "('doc', 'Document Word'), ". + "('eps', 'Document PostScript encapsul".chr(233)."'), ". + "('gz', 'Archive GZ'), ". "('html', 'Fichier HTML'), ". - "('pdf', 'Document PDF'), ". - "('mp3', 'Fichier sonore MP3'), ". - "('wav', 'Fichier sonore WAV'), ". "('mid', 'Musique au format Midi'), ". + "('mov', 'Video QuickTime'), ". + "('mp3', 'Fichier sonore MP3'), ". "('mpg', 'Video MPEG'), ". + "('ogg', 'Fichier sonore Ogg Vorbis'), ". + "('pdf', 'Document PDF'), ". + "('ppt', 'Document PowerPoint'), ". + "('ps', 'Document PostScript'), ". + "('qt', 'Video QuickTime'), ". "('ra', 'Fichier RealAudio'), ". "('ram', 'Fichier RealAudio'), ". "('rm', 'Fichier RealAudio'), ". - "('mov', 'Video QuickTime'), ". - "('qt', 'Video QuickTime'), ". - "('asf', 'Video Windows'), ". - "('avi', 'Video Windows'), ". - "('doc', 'Document Word'), ". - "('xls', 'Document Excel'), ". - "('ppt', 'Document PowerPoint'), ". - "('zip', 'Archive Zip'), ". - "('gz', 'Archive GZ'), ". + "('rtf', 'Document RTF'), ". + "('sit', 'Archive Stuffit'), ". + "('swf', 'Animation Flash'), ". "('tgz', 'Archive TGZ'), ". - "('swf', 'Animation Flash')"; + "('txt', 'Document texte'), ". + "('wav', 'Fichier sonore WAV'), ". + "('xls', 'Document Excel'), ". + "('xml', 'Fichier XML'), ". + "('zip', 'Archive Zip')"; mysql_query($query); } diff --git a/ecrire/inc_version.php3 b/ecrire/inc_version.php3 index ab59a38c24c34fd5a858f77c2cdde1f707381344..35d381ee3a612b7cd0e6d708b986c995950afb1b 100644 --- a/ecrire/inc_version.php3 +++ b/ecrire/inc_version.php3 @@ -12,7 +12,7 @@ define("_ECRIRE_INC_VERSION", "1"); // (utilise pour les modifs de la base de donnees) // -$spip_version = 1.410; // version de la base +$spip_version = 1.411; // version de la base // dernier tag connu ou date si cvs if (! ereg('Name: v(.*) ','$Name$', $regs)) diff --git a/spip_image.php3 b/spip_image.php3 index 8d698c5bcecd6345b9b01f343a598ed3063ede79..2865c6e6e2a7d939be8b16c51f844db22f8f9877 100644 --- a/spip_image.php3 +++ b/spip_image.php3 @@ -52,6 +52,24 @@ function decoder_type_image($type, $strict = false) { } +// +// Corrige l'extension du fichier dans quelques cas particuliers +// + +function corriger_extension($ext) { + switch ($ext) { + case 'htm': + return 'html'; + case 'jpeg': + return 'jpg'; + case 'tiff': + return 'tif'; + default: + return $ext; + } +} + + // // Ajouter une image (logo) // @@ -99,8 +117,7 @@ function ajout_doc($orig, $source, $dest, $mode, $id_document) { if (ereg("\.([^.]+)$", $orig, $match)) { $ext = addslashes(strtolower($match[1])); - if ($ext == 'jpeg') - $ext = 'jpg'; + $ext = corriger_extension($ext); } $query = "SELECT * FROM spip_types_documents WHERE extension='$ext' AND upload='oui'";