Merge "Delete autoload.ide.php"
[lhc/web/wiklou.git] / includes / actions / Action.php
index e8d9a3e..66f4d59 100644 (file)
@@ -19,6 +19,8 @@
  * @file
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * @defgroup Actions Action done on pages
  */
@@ -104,7 +106,7 @@ abstract class Action implements MessageLocalizer {
                }
 
                if ( is_callable( $classOrCallable ) ) {
-                       return call_user_func_array( $classOrCallable, [ $page, $context ] );
+                       return $classOrCallable( $page, $context );
                }
 
                return $classOrCallable;
@@ -255,7 +257,7 @@ abstract class Action implements MessageLocalizer {
         */
        final public function msg( $key ) {
                $params = func_get_args();
-               return call_user_func_array( [ $this->getContext(), 'msg' ], $params );
+               return $this->getContext()->msg( ...$params );
        }
 
        /**
@@ -386,8 +388,7 @@ abstract class Action implements MessageLocalizer {
         * @since 1.25
         */
        public function addHelpLink( $to, $overrideBaseUrl = false ) {
-               global $wgContLang;
-               $msg = wfMessage( $wgContLang->lc(
+               $msg = wfMessage( MediaWikiServices::getInstance()->getContentLanguage()->lc(
                        self::getActionName( $this->getContext() )
                        ) . '-helppage' );