Moved $wgQueryPages stuff out of the global scope and into a function
[lhc/web/wiklou.git] / includes / MimeMagic.php
index 8220e92..e3b8577 100644 (file)
@@ -167,7 +167,7 @@ class MimeMagic {
 
        /** The singleton instance
         */
-       private static $instance;
+       private static $instance = null;
 
        /** Initializes the MimeMagic object. This is called by MimeMagic::singleton().
         *
@@ -336,7 +336,7 @@ class MimeMagic {
         * Get an instance of this class
         * @return MimeMagic
         */
-       public static function &singleton() {
+       public static function singleton() {
                if ( self::$instance === null ) {
                        self::$instance = new MimeMagic;
                }
@@ -508,8 +508,7 @@ class MimeMagic {
                                // trust the file extension
                                $mime = $this->guessTypesForExtension( $ext );
                        }
-               }
-               elseif ( $mime === 'application/x-opc+zip' ) {
+               } elseif ( $mime === 'application/x-opc+zip' ) {
                        if ( $this->isMatchingExtension( $ext, $mime ) ) {
                                // A known file extension for an OPC file,
                                // find the proper mime type for that file extension