Merge "Warn if stateful ParserOutput transforms are used"
[lhc/web/wiklou.git] / includes / api / ApiFormatBase.php
index c5f2fcf..471ce21 100644 (file)
@@ -1,9 +1,5 @@
 <?php
 /**
- *
- *
- * Created on Sep 19, 2006
- *
  * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
  *
  * This program is free software; you can redistribute it and/or modify
@@ -30,7 +26,7 @@
  * @ingroup API
  */
 abstract class ApiFormatBase extends ApiBase {
-       private $mIsHtml, $mFormat, $mUnescapeAmps, $mHelp;
+       private $mIsHtml, $mFormat;
        private $mBuffer, $mDisabled = false;
        private $mIsWrappedHtml = false;
        private $mHttpStatus = false;
@@ -78,7 +74,8 @@ abstract class ApiFormatBase extends ApiBase {
                } elseif ( $this->getIsHtml() ) {
                        return 'api-result.html';
                } else {
-                       $exts = MimeMagic::singleton()->getExtensionsForType( $this->getMimeType() );
+                       $exts = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer()
+                               ->getExtensionsForType( $this->getMimeType() );
                        $ext = $exts ? strtok( $exts, ' ' ) : strtolower( $this->mFormat );
                        return "api-result.$ext";
                }