From 4d0d0a1a4ae1bc5a4c69947fcdfb2b8f3082ce17 Mon Sep 17 00:00:00 2001 From: kent1 <kent1@arscenic.info> Date: Mon, 10 May 2010 22:08:09 +0000 Subject: [PATCH] Restauration correcte des types mime des fichiers Ogg sur les branches 2.1 et 2.2 (http://trac.rezo.net/trac/spip/ticket/1941) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajout des types de fichiers : f4a/f4b/f4p/f4v/mpc (http://en.wikipedia.org/wiki/Flv#File_formats) sur les branches 2.1 et 2.2 Report du commit oublié : 14272 (http://trac.rezo.net/trac/spip/changeset/14272) sur la branche 2.2 Upgrade de la base en version 15676 sur les branches 2.1 et 2.2 Rend homogène (cosmétique) les espaces dans les arrays des documents --- ecrire/base/typedoc.php | 379 +++++++++++++++++++++------------------- ecrire/inc_version.php | 14 +- ecrire/maj/svn10000.php | 17 +- 3 files changed, 217 insertions(+), 193 deletions(-) diff --git a/ecrire/base/typedoc.php b/ecrire/base/typedoc.php index 1b9c43dcf7..cd766f3828 100644 --- a/ecrire/base/typedoc.php +++ b/ecrire/base/typedoc.php @@ -18,9 +18,9 @@ global $tables_images, $tables_sequences, $tables_documents, $tables_mime, $mime $tables_images = array( // Images reconnues par PHP - 'jpg' => 'JPEG', - 'png' => 'PNG', - 'gif' =>'GIF', + 'jpg' => 'JPEG', + 'png' => 'PNG', + 'gif' => 'GIF', // Autres images (peuvent utiliser le tag <img>) 'bmp' => 'BMP', @@ -30,159 +30,179 @@ $tables_images = array( // Multimedia (peuvent utiliser le tag <embed>) $tables_sequences = array( - 'aiff' => 'AIFF', - 'anx' => 'Annodex', - 'axa' => 'Annodex Audio', - 'axv' => 'Annodex Video', - 'asf' => 'Windows Media', - 'avi' => 'AVI', - 'flac' => 'Free Lossless Audio Codec', - 'flv' => 'Flash Video', - 'mid' => 'Midi', - 'mng' => 'MNG', - 'mka' => 'Matroska Audio', - 'mkv' => 'Matroska Video', - 'mov' => 'QuickTime', - 'mp3' => 'MP3', - 'mp4' => 'MPEG4', - 'mpg' => 'MPEG', - 'oga' => 'Ogg Audio', - 'ogg' => 'Ogg Vorbis', - 'ogv' => 'Ogg Video', - 'ogx' => 'Ogg Multiplex', - 'qt' => 'QuickTime', - 'ra' => 'RealAudio', - 'ram' => 'RealAudio', - 'rm' => 'RealAudio', - 'spx' => 'Ogg Speex', - 'svg' => 'Scalable Vector Graphics', - 'swf' => 'Flash', - 'wav' => 'WAV', - 'wmv' => 'Windows Media', - '3gp' => '3rd Generation Partnership Project' - ); + 'aiff' => 'AIFF', + 'anx' => 'Annodex', + 'axa' => 'Annodex Audio', + 'axv' => 'Annodex Video', + 'asf' => 'Windows Media', + 'avi' => 'AVI', + 'dv' => 'Digital Video', + 'f4a' => 'Audio for Adobe Flash Player', + 'f4b' => 'Audio Book for Adobe Flash Player', + 'f4p' => 'Protected Video for Adobe Flash Player', + 'f4v' => 'Video for Adobe Flash Player', + 'flac' => 'Free Lossless Audio Codec', + 'flv' => 'Flash Video', + 'm4v' => 'MPEG4 Video', + 'm4a' => 'MPEG4 Audio', + 'm4b' => 'MPEG4 Audio', + 'm4p' => 'MPEG4 Audio', + 'mid' => 'Midi', + 'mng' => 'MNG', + 'mka' => 'Matroska Audio', + 'mkv' => 'Matroska Video', + 'mov' => 'QuickTime', + 'mp3' => 'MP3', + 'mp4' => 'MPEG4', + 'mpc' => 'Musepack', + 'mpg' => 'MPEG', + 'oga' => 'Ogg Audio', + 'ogg' => 'Ogg Vorbis', + 'ogv' => 'Ogg Video', + 'ogx' => 'Ogg Multiplex', + 'qt' => 'QuickTime', + 'ra' => 'RealAudio', + 'ram' => 'RealAudio', + 'rm' => 'RealAudio', + 'spx' => 'Ogg Speex', + 'svg' => 'Scalable Vector Graphics', + 'swf' => 'Flash', + 'wav' => 'WAV', + 'wmv' => 'Windows Media', + '3gp' => '3rd Generation Partnership Project' + ); // Documents varies $tables_documents = array( - 'abw' => 'Abiword', - 'ai' => 'Adobe Illustrator', - 'bz2' => 'BZip', - 'bin' => 'Binary Data', - 'blend' => 'Blender', - 'c' => 'C source', - 'cls' => 'LaTeX Class', - 'css' => 'Cascading Style Sheet', - 'csv' => 'Comma Separated Values', - 'deb' => 'Debian', - 'doc' => 'Word', - 'djvu' => 'DjVu', - 'dvi' => 'LaTeX DVI', - 'eps' => 'PostScript', - 'gz' => 'GZ', - 'h' => 'C header', - 'html' => 'HTML', - 'kml' => 'Keyhole Markup Language', - 'kmz' => 'Google Earth Placemark File', - 'pas' => 'Pascal', - 'pdf' => 'PDF', - 'pgn' => 'Portable Game Notation', - 'ppt' => 'PowerPoint', - 'ps' => 'PostScript', - 'psd' => 'Photoshop', - 'rpm' => 'RedHat/Mandrake/SuSE', - 'rtf' => 'RTF', - 'sdd' => 'StarOffice', - 'sdw' => 'StarOffice', - 'sit' => 'Stuffit', - 'sty' => 'LaTeX Style Sheet', - 'sxc' => 'OpenOffice.org Calc', - 'sxi' => 'OpenOffice.org Impress', - 'sxw' => 'OpenOffice.org', - 'tex' => 'LaTeX', - 'tgz' => 'TGZ', - 'torrent' => 'BitTorrent', - 'ttf' => 'TTF Font', - 'txt' => 'texte', - 'xcf' => 'GIMP multi-layer', - 'xspf' => 'XSPF', - 'xls' => 'Excel', - 'xml' => 'XML', - 'zip' => 'Zip', + 'abw' => 'Abiword', + 'ai' => 'Adobe Illustrator', + 'bz2' => 'BZip', + 'bin' => 'Binary Data', + 'blend' => 'Blender', + 'c' => 'C source', + 'cls' => 'LaTeX Class', + 'css' => 'Cascading Style Sheet', + 'csv' => 'Comma Separated Values', + 'deb' => 'Debian', + 'doc' => 'Word', + 'djvu' => 'DjVu', + 'dvi' => 'LaTeX DVI', + 'eps' => 'PostScript', + 'gz' => 'GZ', + 'h' => 'C header', + 'html' => 'HTML', + 'kml' => 'Keyhole Markup Language', + 'kmz' => 'Google Earth Placemark File', + 'm4u' => 'MPEG4 playliste', + 'pas' => 'Pascal', + 'pdf' => 'PDF', + 'pgn' => 'Portable Game Notation', + 'ppt' => 'PowerPoint', + 'ps' => 'PostScript', + 'psd' => 'Photoshop', + 'rpm' => 'RedHat/Mandrake/SuSE', + 'rtf' => 'RTF', + 'sdd' => 'StarOffice', + 'sdw' => 'StarOffice', + 'sit' => 'Stuffit', + 'sty' => 'LaTeX Style Sheet', + 'sxc' => 'OpenOffice.org Calc', + 'sxi' => 'OpenOffice.org Impress', + 'sxw' => 'OpenOffice.org', + 'tex' => 'LaTeX', + 'tgz' => 'TGZ', + 'torrent' => 'BitTorrent', + 'ttf' => 'TTF Font', + 'txt' => 'texte', + 'xcf' => 'GIMP multi-layer', + 'xspf' => 'XSPF', + 'xls' => 'Excel', + 'xml' => 'XML', + 'zip' => 'Zip', - // open document format - 'odt' => 'opendocument text', - 'ods' => 'opendocument spreadsheet', - 'odp' => 'opendocument presentation', - 'odg' => 'opendocument graphics', - 'odc' => 'opendocument chart', - 'odf' => 'opendocument formula', - 'odb' => 'opendocument database', - 'odi' => 'opendocument image', - 'odm' => 'opendocument text-master', - 'ott' => 'opendocument text-template', - 'ots' => 'opendocument spreadsheet-template', - 'otp' => 'opendocument presentation-template', - 'otg' => 'opendocument graphics-template', + // open document format + 'odt' => 'opendocument text', + 'ods' => 'opendocument spreadsheet', + 'odp' => 'opendocument presentation', + 'odg' => 'opendocument graphics', + 'odc' => 'opendocument chart', + 'odf' => 'opendocument formula', + 'odb' => 'opendocument database', + 'odi' => 'opendocument image', + 'odm' => 'opendocument text-master', + 'ott' => 'opendocument text-template', + 'ots' => 'opendocument spreadsheet-template', + 'otp' => 'opendocument presentation-template', + 'otg' => 'opendocument graphics-template', - // Open XML File Formats - 'docm' => 'Word', - 'docx' => 'Word', - 'dotm' => 'Word template', - 'dotx' => 'Word template', + // Open XML File Formats + 'docm' => 'Word', + 'docx' => 'Word', + 'dotm' => 'Word template', + 'dotx' => 'Word template', - 'potm' => 'Powerpoint template', - 'potx' => 'Powerpoint template', - 'ppam' => 'Powerpoint addin', - 'ppsm' => 'Powerpoint slideshow', - 'ppsx' => 'Powerpoint slideshow', - 'pptm' => 'Powerpoint', - 'pptx' => 'Powerpoint', + 'potm' => 'Powerpoint template', + 'potx' => 'Powerpoint template', + 'ppam' => 'Powerpoint addin', + 'ppsm' => 'Powerpoint slideshow', + 'ppsx' => 'Powerpoint slideshow', + 'pptm' => 'Powerpoint', + 'pptx' => 'Powerpoint', - 'xlam' => 'Excel', - 'xlsb' => 'Excel binary', - 'xlsm' => 'Excel', - 'xlsx' => 'Excel', - 'xltm' => 'Excel template', - 'xltx' => 'Excel template', - - - ); + 'xlam' => 'Excel', + 'xlsb' => 'Excel binary', + 'xlsm' => 'Excel', + 'xlsx' => 'Excel', + 'xltm' => 'Excel template', + 'xltx' => 'Excel template' + ); $tables_mime = array( // Images reconnues par PHP - 'jpg'=>'image/jpeg', - 'png'=>'image/png', - 'gif'=>'image/gif', + 'jpg' => 'image/jpeg', + 'png' => 'image/png', + 'gif' => 'image/gif', // Autres images (peuvent utiliser le tag <img>) - 'bmp'=>'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp - 'tif'=>'image/tiff', + 'bmp' => 'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp + 'tif' => 'image/tiff', // Multimedia (peuvent utiliser le tag <embed>) - 'aiff'=>'audio/x-aiff', - 'asf'=>'video/x-ms-asf', - 'avi'=>'video/x-msvideo', - 'anx'=>'application/annodex', - 'axa'=>'audio/annodex', - 'axv'=>'video/annodex', + 'aiff' => 'audio/x-aiff', + 'asf' => 'video/x-ms-asf', + 'avi' => 'video/x-msvideo', + 'anx' => 'application/annodex', + 'axa' => 'audio/annodex', + 'axv' => 'video/annodex', + 'dv' => 'video/x-dv', + 'f4a' => 'audio/mp4', + 'f4b' => 'audio/mp4', + 'f4p' => 'video/mp4', + 'f4v' => 'video/mp4', 'flac' => 'audio/x-flac', 'flv' => 'video/x-flv', - 'mid'=>'audio/midi', + 'm4a' => 'audio/mp4a-latm', + 'm4b' => 'audio/mp4a-latm', + 'm4p' => 'audio/mp4a-latm', + 'm4u' => 'video/vnd.mpegurl', + 'm4v' => 'video/x-m4v', + 'mid' => 'audio/midi', 'mka' => 'audio/mka', 'mkv' => 'video/mkv', - 'mng'=>'video/x-mng', - 'mov'=>'video/quicktime', - 'mp3'=>'audio/mpeg', + 'mng' => 'video/x-mng', + 'mov' => 'video/quicktime', + 'mp3' => 'audio/mpeg', 'mp4' => 'application/mp4', - 'mpg'=>'video/mpeg', + 'mpc' => 'audio/x-musepack', + 'mpg' => 'video/mpeg', 'oga' => 'audio/ogg', - 'ogg' => 'audio/ogg ', - 'ogv' => 'video/ogg ', - 'ogx' => 'application/ogg ', - 'qt' =>'video/quicktime', - 'ra' =>'audio/x-pn-realaudio', - 'ram'=>'audio/x-pn-realaudio', - 'rm' =>'audio/x-pn-realaudio', + 'ogg' => 'audio/ogg', + 'ogv' => 'video/ogg', + 'ogx' => 'application/ogg', + 'qt' => 'video/quicktime', + 'ra' => 'audio/x-pn-realaudio', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', 'spx' => 'audio/ogg', 'svg'=>'image/svg+xml', 'swf'=>'application/x-shockwave-flash', @@ -191,48 +211,48 @@ $tables_mime = array( '3gp'=>'video/3gpp', // Documents varies - 'ai' =>'application/illustrator', - 'abw' =>'application/abiword', + 'ai' => 'application/illustrator', + 'abw' => 'application/abiword', 'bin' => 'application/octet-stream', # le tout-venant 'blend' => 'application/x-blender', - 'bz2'=>'application/x-bzip2', - 'c' =>'text/x-csrc', - 'css'=>'text/css', - 'csv'=>'text/csv', - 'deb'=>'application/x-debian-package', - 'doc'=>'application/msword', - 'djvu'=>'image/vnd.djvu', - 'dvi'=>'application/x-dvi', - 'eps'=>'application/postscript', - 'gz' =>'application/x-gzip', - 'h' =>'text/x-chdr', - 'html'=>'text/html', - 'kml'=>'application/vnd.google-earth.kml+xml', - 'kmz'=>'application/vnd.google-earth.kmz', - 'pas'=>'text/x-pascal', - 'pdf'=>'application/pdf', - 'pgn' =>'application/x-chess-pgn', - 'ppt'=>'application/vnd.ms-powerpoint', - 'ps' =>'application/postscript', - 'psd'=>'image/x-photoshop', // pas enregistre par IANA - 'rpm'=>'application/x-redhat-package-manager', - 'rtf'=>'application/rtf', - 'sdd'=>'application/vnd.stardivision.impress', - 'sdw'=>'application/vnd.stardivision.writer', - 'sit'=>'application/x-stuffit', - 'sxc'=>'application/vnd.sun.xml.calc', - 'sxi'=>'application/vnd.sun.xml.impress', - 'sxw'=>'application/vnd.sun.xml.writer', - 'tex'=>'text/x-tex', - 'tgz'=>'application/x-gtar', + 'bz2' => 'application/x-bzip2', + 'c' => 'text/x-csrc', + 'css' => 'text/css', + 'csv' => 'text/csv', + 'deb' => 'application/x-debian-package', + 'doc' => 'application/msword', + 'djvu' => 'image/vnd.djvu', + 'dvi' => 'application/x-dvi', + 'eps' => 'application/postscript', + 'gz' => 'application/x-gzip', + 'h' => 'text/x-chdr', + 'html' => 'text/html', + 'kml' => 'application/vnd.google-earth.kml+xml', + 'kmz' => 'application/vnd.google-earth.kmz', + 'pas' => 'text/x-pascal', + 'pdf' => 'application/pdf', + 'pgn' => 'application/x-chess-pgn', + 'ppt' => 'application/vnd.ms-powerpoint', + 'ps' => 'application/postscript', + 'psd' => 'image/x-photoshop', // pas enregistre par IANA + 'rpm' => 'application/x-redhat-package-manager', + 'rtf' => 'application/rtf', + 'sdd' => 'application/vnd.stardivision.impress', + 'sdw' => 'application/vnd.stardivision.writer', + 'sit' => 'application/x-stuffit', + 'sxc' => 'application/vnd.sun.xml.calc', + 'sxi' => 'application/vnd.sun.xml.impress', + 'sxw' => 'application/vnd.sun.xml.writer', + 'tex' => 'text/x-tex', + 'tgz' => 'application/x-gtar', 'torrent' => 'application/x-bittorrent', - 'ttf'=>'application/x-font-ttf', - 'txt'=>'text/plain', - 'xcf'=>'application/x-xcf', - 'xls'=>'application/vnd.ms-excel', - 'xspf'=>'application/xspf+xml', - 'xml'=>'application/xml', - 'zip'=>'application/zip', + 'ttf' => 'application/x-font-ttf', + 'txt' => 'text/plain', + 'xcf' => 'application/x-xcf', + 'xls' => 'application/vnd.ms-excel', + 'xspf' => 'application/xspf+xml', + 'xml' => 'application/xml', + 'zip' => 'application/zip', // Open Document format 'odt' => 'application/vnd.oasis.opendocument.text', @@ -249,9 +269,8 @@ $tables_mime = array( 'otp' => 'application/vnd.oasis.opendocument.presentation-template', 'otg' => 'application/vnd.oasis.opendocument.graphics-template', - - 'cls'=>'text/x-tex', - 'sty'=>'text/x-tex', + 'cls' => 'text/x-tex', + 'sty' => 'text/x-tex', // Open XML File Formats 'docm' => 'application/vnd.ms-word.document.macroEnabled.12', @@ -272,13 +291,13 @@ $tables_mime = array( 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12', - 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', - + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' ); $mime_alias = array ( 'audio/x-mpeg' => 'audio/mpeg', + 'audio/x-musepack' => 'audio/musepack', 'application/x-ogg' => 'application/ogg', 'video/mp4' => 'application/mp4', 'video/flv' => 'video/x-flv', diff --git a/ecrire/inc_version.php b/ecrire/inc_version.php index ea9fab699d..d6b1152757 100644 --- a/ecrire/inc_version.php +++ b/ecrire/inc_version.php @@ -21,7 +21,7 @@ error_reporting(E_ALL ^ E_NOTICE); # ne concerne que le fichier mes_options.php3 define('_EXTENSION_PHP', '.php3'); #define('_EXTENSION_PHP', ''); -#mettre a true pour compatibilite PHP3 +#mettre a true pour compatibilite PHP3 define('_FEED_GLOBALS', false); # le nom du repertoire ecrire/ @@ -225,7 +225,7 @@ $controler_dates_rss = true; // class_spip : savoir si on veut class="spip" sur p i strong & li // class_spip_plus : class="spip" sur les ul ol h3 hr quote table... // la difference c'est que des css specifiques existent pour les seconds -// +// $class_spip = ''; /*' class="spip"'*/ $class_spip_plus = ' class="spip"'; $toujours_paragrapher = true; @@ -355,7 +355,7 @@ $table_date = array(); $table_titre = array(); $tables_jointures = array(); -// Liste des statuts. +// Liste des statuts. $liste_des_statuts = array( "info_administrateurs" => '0minirezo', "info_redacteurs" =>'1comite', @@ -368,7 +368,7 @@ $liste_des_etats = array( 'texte_statut_propose_evaluation' => 'prop', 'texte_statut_publie' => 'publie', 'texte_statut_poubelle' => 'poubelle', - 'texte_statut_refuse' => 'refuse' + 'texte_statut_refuse' => 'refuse' ); $liste_des_forums = array( @@ -391,16 +391,16 @@ $liste_des_authentifications = array( // Droits d'acces maximum par defaut @umask(0); -// numero de branche, utilise par les plugins +// numero de branche, utilise par les plugins // pour specifier les versions de SPIP necessaires // il faut s'en tenir a un nombre de decimales fixe -// ex : 2.0.0, 2.0.0-dev, 2.0.0-beta, 2.0.0-beta2 +// ex : 2.0.0, 2.0.0-dev, 2.0.0-beta, 2.0.0-beta2 $spip_version_branche = "2.2.0-dev"; // version des signatures de fonctions PHP // (= numero SVN de leur derniere modif cassant la compatibilite et/ou necessitant un recalcul des squelettes) $spip_version_code = 14720; // version de la base SQL (= numero SVN de sa derniere modif) -$spip_version_base = 14598; +$spip_version_base = 15676; // version de l'interface a la base $spip_sql_version = 1; diff --git a/ecrire/maj/svn10000.php b/ecrire/maj/svn10000.php index d41b99b397..cdc92ec16d 100644 --- a/ecrire/maj/svn10000.php +++ b/ecrire/maj/svn10000.php @@ -65,12 +65,12 @@ $GLOBALS['maj'][11388] = array(array('maj_11388')); // reparer spip_mots.type = titre du groupe function maj_11431 () { - // mysql only + // mysql only // spip_query("UPDATE spip_mots AS a LEFT JOIN spip_groupes_mots AS b ON (a.id_groupe = b.id_groupe) SET a.type=b.titre"); - + // selection des mots cles dont le type est different du groupe $res = sql_select( - array("a.id_mot AS id_mot", "b.titre AS type"), + array("a.id_mot AS id_mot", "b.titre AS type"), array("spip_mots AS a LEFT JOIN spip_groupes_mots AS b ON (a.id_groupe = b.id_groupe)"), array("a.type != b.titre")); // mise a jour de ces mots la @@ -82,7 +82,7 @@ function maj_11431 () { } $GLOBALS['maj'][11431] = array(array('maj_11431')); -// reparer spip_types_documents.id_type +// reparer spip_types_documents.id_type // qui est parfois encore present function maj_11778 () { // si presence id_type @@ -233,7 +233,6 @@ $GLOBALS['maj'][14558] = array(array('upgrade_types_documents')); // etre sur qu'ils sont bien unipotents(?)... $GLOBALS['maj'][14559] = $GLOBALS['maj'][13904]+$GLOBALS['maj'][13929]+$GLOBALS['maj'][14558]; - // La version 14588 etait une mauvaise piste: // Retour en arriere pour ceux qui l'ont subi, ne rien faire sinon if (@$GLOBALS['meta']['version_installee'] >= 14588) { @@ -244,7 +243,7 @@ if (@$GLOBALS['meta']['version_installee'] >= 14588) { array('sql_alter',"TABLE spip_documents CHANGE mode genre ENUM('vignette', 'image', 'document') DEFAULT 'document' NOT NULL"), array('sql_alter',"TABLE spip_documents ADD INDEX genre(genre)") ); - // solution moins intrusive au pb de mot-clé d'Oracle, retour avant 14588 + // solution moins intrusive au pb de mot-cl� d'Oracle, retour avant 14588 $GLOBALS['maj'][14598] = array( array('sql_alter',"TABLE spip_documents DROP INDEX genre"), array('sql_alter',"TABLE spip_documents CHANGE genre mode ENUM('vignette', 'image', 'document') DEFAULT 'document' NOT NULL"), @@ -252,4 +251,10 @@ if (@$GLOBALS['meta']['version_installee'] >= 14588) { ); } +// Restauration correcte des types mime des fichiers Ogg +// http://trac.rezo.net/trac/spip/ticket/1941 +// + Types de fichiers : f4a/f4b/f4p/f4v/mpc http://en.wikipedia.org/wiki/Flv#File_formats +// + Report du commit oublié : http://trac.rezo.net/trac/spip/changeset/14272 +$GLOBALS['maj'][15676] = array(array('upgrade_types_documents')); + ?> -- GitLab