X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2FCommentStoreComment.php;h=af866cdce767d2cc00744f87cf6ce085a0b5504a;hb=d67121f6d3961bb7dfc44f71e8b5a4b8b9279eef;hp=3920ba083febb5e4fb788c681f00a3c65a17cd14;hpb=17e88d99eb768e4181207bbd35656d239ef5d4e8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CommentStoreComment.php b/includes/CommentStoreComment.php index 3920ba083f..af866cdce7 100644 --- a/includes/CommentStoreComment.php +++ b/includes/CommentStoreComment.php @@ -19,8 +19,7 @@ * * @file */ - -use Wikimedia\Rdbms\IDatabase; +use MediaWiki\MediaWikiServices; /** * CommentStoreComment represents a comment stored by CommentStore. The fields @@ -65,8 +64,6 @@ class CommentStoreComment { * @return CommentStoreComment */ public static function newUnsavedComment( $comment, array $data = null ) { - global $wgContLang; - if ( $comment instanceof CommentStoreComment ) { return $comment; } @@ -81,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 );