* @file
*/
+use MediaWiki\MediaWikiServices;
+
/**
* @defgroup Actions Action done on pages
*/
}
if ( is_callable( $classOrCallable ) ) {
- return call_user_func_array( $classOrCallable, [ $page, $context ] );
+ return $classOrCallable( $page, $context );
}
return $classOrCallable;
return 'view';
}
- $action = Action::factory( $actionName, $context->getWikiPage(), $context );
+ $action = self::factory( $actionName, $context->getWikiPage(), $context );
if ( $action instanceof Action ) {
return $action->getName();
}
*/
final public function msg( $key ) {
$params = func_get_args();
- return call_user_func_array( [ $this->getContext(), 'msg' ], $params );
+ return $this->getContext()->msg( ...$params );
}
/**
* @since 1.25
*/
public function addHelpLink( $to, $overrideBaseUrl = false ) {
- global $wgContLang;
- $msg = wfMessage( $wgContLang->lc(
- Action::getActionName( $this->getContext() )
+ $msg = wfMessage( MediaWikiServices::getInstance()->getContentLanguage()->lc(
+ self::getActionName( $this->getContext() )
) . '-helppage' );
if ( !$msg->isDisabled() ) {