dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Prevent "Log in" being used in two different contexts"
[lhc/web/wiklou.git]
/
includes
/
MimeMagic.php
diff --git
a/includes/MimeMagic.php
b/includes/MimeMagic.php
index
44fafca
..
f5c28ab
100644
(file)
--- a/
includes/MimeMagic.php
+++ b/
includes/MimeMagic.php
@@
-167,11
+167,7
@@
class MimeMagic {
/** The singleton instance
*/
/** The singleton instance
*/
- private static $instance;
-
- /** True if the fileinfo extension has been loaded
- */
- private static $extensionLoaded = false;
+ private static $instance = null;
/** Initializes the MimeMagic object. This is called by MimeMagic::singleton().
*
/** Initializes the MimeMagic object. This is called by MimeMagic::singleton().
*
@@
-182,7
+178,7
@@
class MimeMagic {
* --- load mime.types ---
*/
* --- load mime.types ---
*/
- global $wgMimeTypeFile, $IP
, $wgLoadFileinfoExtension
;
+ global $wgMimeTypeFile, $IP;
$types = MM_WELL_KNOWN_MIME_TYPES;
$types = MM_WELL_KNOWN_MIME_TYPES;
@@
-190,11
+186,6
@@
class MimeMagic {
$wgMimeTypeFile = "$IP/$wgMimeTypeFile";
}
$wgMimeTypeFile = "$IP/$wgMimeTypeFile";
}
- if ( $wgLoadFileinfoExtension && !self::$extensionLoaded ) {
- self::$extensionLoaded = true;
- wfDl( 'fileinfo' );
- }
-
if ( $wgMimeTypeFile ) {
if ( is_file( $wgMimeTypeFile ) and is_readable( $wgMimeTypeFile ) ) {
wfDebug( __METHOD__ . ": loading mime types from $wgMimeTypeFile\n" );
if ( $wgMimeTypeFile ) {
if ( is_file( $wgMimeTypeFile ) and is_readable( $wgMimeTypeFile ) ) {
wfDebug( __METHOD__ . ": loading mime types from $wgMimeTypeFile\n" );
@@
-345,7
+336,7
@@
class MimeMagic {
* Get an instance of this class
* @return 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;
}
if ( self::$instance === null ) {
self::$instance = new MimeMagic;
}