Merge "fix some spacing"
[lhc/web/wiklou.git] / includes / MimeMagic.php
index 5b88480..226b0b1 100644 (file)
@@ -144,21 +144,21 @@ END_STRING
 class MimeMagic {
 
        /**
-       * Mapping of media types to arrays of mime types.
-       * This is used by findMediaType and getMediaType, respectively
-       */
+        * Mapping of media types to arrays of mime types.
+        * This is used by findMediaType and getMediaType, respectively
+        */
        var $mMediaTypes = null;
 
        /** Map of mime type aliases
-       */
+        */
        var $mMimeTypeAliases = null;
 
        /** map of mime types to file extensions (as a space seprarated list)
-       */
+        */
        var $mMimeToExt = null;
 
        /** map of file extensions types to mime types (as a space seprarated list)
-       */
+        */
        var $mExtToMime = null;
 
        /** IEContentAnalyzer instance
@@ -179,8 +179,8 @@ class MimeMagic {
         */
        function __construct() {
                /**
-               *   --- load mime.types ---
-               */
+                *   --- load mime.types ---
+                */
 
                global $wgMimeTypeFile, $IP, $wgLoadFileinfoExtension;
 
@@ -413,7 +413,6 @@ class MimeMagic {
                return $m;
        }
 
-
        /**
         * Tests if the extension matches the given mime type. Returns true if a
         * match was found, null if the mime type is unknown, and false if the
@@ -427,7 +426,7 @@ class MimeMagic {
                $ext = $this->getExtensionsForType( $mime );
 
                if ( !$ext ) {
-                       return null;  // Unknown mime type
+                       return null; // Unknown mime type
                }
 
                $ext = explode( ' ', $ext );
@@ -701,7 +700,7 @@ class MimeMagic {
                }
 
                if ( $script_type ) {
-                       if ( $script_type !== "UTF-8" && $script_type !== "ASCII") {
+                       if ( $script_type !== "UTF-8" && $script_type !== "ASCII" ) {
                                // Quick and dirty fold down to ASCII!
                                $pack = array( 'UTF-16BE' => 'n*', 'UTF-16LE' => 'v*' );
                                $chars = unpack( $pack[$script_type], substr( $head, 2 ) );
@@ -802,12 +801,13 @@ class MimeMagic {
                        # TODO: remove the block below, as soon as improveTypeFromExtension is used everywhere
                        if ( $ext !== true && $ext !== false ) {
                                /** This is the mode used by getPropsFromPath
-                               * These mime's are stored in the database, where we don't really want
-                               * x-opc+zip, because we use it only for internal purposes
-                               */
+                                * These mime's are stored in the database, where we don't really want
+                                * x-opc+zip, because we use it only for internal purposes
+                                */
                                if ( $this->isMatchingExtension( $ext, $mime) ) {
                                        /* A known file extension for an OPC file,
-                                       * find the proper mime type for that file extension */
+                                        * find the proper mime type for that file extension
+                                        */
                                        $mime = $this->guessTypesForExtension( $ext );
                                } else {
                                        $mime = "application/zip";