X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FAction.php;h=fb22445410ab802ec3f0791a1f4b7f8884465c65;hb=9f32a4dc89ec5788987e1378b05f156b7d666db3;hp=88382b694fca813a7c5158cef6b9452f5d24be22;hpb=1c7f71cefab6a2b3163312bccaa3c46bc61b063d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/Action.php b/includes/actions/Action.php index 88382b694f..fb22445410 100644 --- a/includes/actions/Action.php +++ b/includes/actions/Action.php @@ -104,7 +104,7 @@ abstract class Action implements MessageLocalizer { } if ( is_callable( $classOrCallable ) ) { - return call_user_func_array( $classOrCallable, [ $page, $context ] ); + return $classOrCallable( $page, $context ); } return $classOrCallable; @@ -151,7 +151,7 @@ abstract class Action implements MessageLocalizer { return 'view'; } - $action = Action::factory( $actionName, $context->getWikiPage(), $context ); + $action = self::factory( $actionName, $context->getWikiPage(), $context ); if ( $action instanceof Action ) { return $action->getName(); } @@ -255,7 +255,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 ); } /** @@ -388,7 +388,7 @@ abstract class Action implements MessageLocalizer { public function addHelpLink( $to, $overrideBaseUrl = false ) { global $wgContLang; $msg = wfMessage( $wgContLang->lc( - Action::getActionName( $this->getContext() ) + self::getActionName( $this->getContext() ) ) . '-helppage' ); if ( !$msg->isDisabled() ) {