Merge "jqueryMsg: Don't fall back to simple parser when jQuery params passed"
[lhc/web/wiklou.git] / includes / actions / SpecialPageAction.php
index 29a494b..8a231cb 100644 (file)
@@ -18,6 +18,8 @@
  * @ingroup Actions
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * An action that just passes the request to the relevant special page
  *
@@ -28,10 +30,10 @@ class SpecialPageAction extends FormlessAction {
        /**
         * @var array A mapping of action names to special page names.
         */
-       public static $actionToSpecialPageMapping = array(
+       public static $actionToSpecialPageMapping = [
                'revisiondelete' => 'Revisiondelete',
                'editchangetags' => 'EditTags',
-       );
+       ];
 
        public function getName() {
                $request = $this->getRequest();
@@ -92,6 +94,7 @@ class SpecialPageAction extends FormlessAction {
                }
 
                // map actions to (whitelisted) special pages
-               return SpecialPageFactory::getPage( self::$actionToSpecialPageMapping[$action] );
+               return MediaWikiServices::getInstance()->getSpecialPageFactory()->
+                       getPage( self::$actionToSpecialPageMapping[$action] );
        }
 }