Add 'ogv' as recognized alias to 'ogg', allowing uploads of .ogv files to proceed...
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 6 Jun 2008 19:58:06 +0000 (19:58 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 6 Jun 2008 19:58:06 +0000 (19:58 +0000)
includes/MimeMagic.php
includes/filerepo/File.php

index e7c30ed..01d33c7 100644 (file)
@@ -9,7 +9,7 @@
  * the file mime.types in the includes directory.
  */
 define('MM_WELL_KNOWN_MIME_TYPES',<<<END_STRING
-application/ogg ogg ogm
+application/ogg ogg ogm ogv
 application/pdf pdf
 application/x-javascript js
 application/x-shockwave-flash swf
@@ -29,7 +29,7 @@ image/x-portable-pixmap ppm
 image/x-xcf xcf
 text/plain txt
 text/html html htm
-video/ogg ogm ogg
+video/ogg ogm ogg ogv
 video/mpeg mpg mpeg
 END_STRING
 );
@@ -360,7 +360,7 @@ class MimeMagic {
                        'xbm',
 
                        // Formats we recognize magic numbers for
-                       'djvu', 'ogg', 'mid', 'pdf', 'wmf', 'xcf',
+                       'djvu', 'ogg', 'ogv', 'mid', 'pdf', 'wmf', 'xcf',
 
                        // XML formats we sure hope we recognize reliably
                        'svg',
index 7fb26f3..7a1c68e 100644 (file)
@@ -79,7 +79,8 @@ abstract class File {
                        'htm' => 'html',
                        'jpeg' => 'jpg',
                        'mpeg' => 'mpg',
-                       'tiff' => 'tif' );
+                       'tiff' => 'tif',
+                       'ogv' => 'ogg' );
                if( isset( $squish[$lower] ) ) {
                        return $squish[$lower];
                } elseif( preg_match( '/^[0-9a-z]+$/', $lower ) ) {