jenkins-bot has submitted this change and it was merged.

Change subject: Use MimeMagic::singleton() instead of instantiating a new class
......................................................................


Use MimeMagic::singleton() instead of instantiating a new class

Change-Id: I3299c66568780c1026ebabecddda51f0f2fdc9c2
---
M includes/index/ProofreadIndexPage.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Tpt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/index/ProofreadIndexPage.php 
b/includes/index/ProofreadIndexPage.php
index ffdb7a7..73797a3 100644
--- a/includes/index/ProofreadIndexPage.php
+++ b/includes/index/ProofreadIndexPage.php
@@ -255,7 +255,7 @@
         */
        public function getMimeType() {
                if( preg_match( "/^.*\.(.{2,5})$/", $this->title->getText(), $m 
) ) {
-                       $mimeMagic = new MimeMagic();
+                       $mimeMagic = MimeMagic::singleton();
                        return $mimeMagic->guessTypesForExtension( $m[1] );
                } else {
                        return null;

-- 
To view, visit https://gerrit.wikimedia.org/r/155876
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3299c66568780c1026ebabecddda51f0f2fdc9c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Tpt <thoma...@hotmail.fr>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to