X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FCommentStoreComment.php;h=af866cdce767d2cc00744f87cf6ce085a0b5504a;hb=5a1f6dbe6343e76b510537976b17aa8288698aa5;hp=7ed86d66c7691c3e4407bdbe886b159c13afae7a;hpb=587d08c5a626f8195def9f82ee83e17c85824db8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CommentStoreComment.php b/includes/CommentStoreComment.php index 7ed86d66c7..af866cdce7 100644 --- a/includes/CommentStoreComment.php +++ b/includes/CommentStoreComment.php @@ -19,6 +19,7 @@ * * @file */ +use MediaWiki\MediaWikiServices; /** * CommentStoreComment represents a comment stored by CommentStore. The fields @@ -63,8 +64,6 @@ class CommentStoreComment { * @return CommentStoreComment */ public static function newUnsavedComment( $comment, array $data = null ) { - global $wgContLang; - if ( $comment instanceof CommentStoreComment ) { return $comment; } @@ -79,7 +78,8 @@ class CommentStoreComment { if ( $comment instanceof Message ) { $message = clone $comment; - $text = $message->inLanguage( $wgContLang ) // Avoid $wgForceUIMsgAsContentMsg + // Avoid $wgForceUIMsgAsContentMsg + $text = $message->inLanguage( MediaWikiServices::getInstance()->getContentLanguage() ) ->setInterfaceMessageFlag( true ) ->text(); return new CommentStoreComment( null, $text, $message, $data );