dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Deprecate Parser implementation methods (will be private in next release)
[lhc/web/wiklou.git]
/
includes
/
CommentStoreComment.php
diff --git
a/includes/CommentStoreComment.php
b/includes/CommentStoreComment.php
index
3920ba0
..
9f1681d
100644
(file)
--- a/
includes/CommentStoreComment.php
+++ b/
includes/CommentStoreComment.php
@@
-19,8
+19,7
@@
*
* @file
*/
*
* @file
*/
-
-use Wikimedia\Rdbms\IDatabase;
+use MediaWiki\MediaWikiServices;
/**
* CommentStoreComment represents a comment stored by CommentStore. The fields
/**
* CommentStoreComment represents a comment stored by CommentStore. The fields
@@
-51,7
+50,7
@@
class CommentStoreComment {
public function __construct( $id, $text, Message $message = null, array $data = null ) {
$this->id = $id;
$this->text = $text;
public function __construct( $id, $text, Message $message = null, array $data = null ) {
$this->id = $id;
$this->text = $text;
- $this->message = $message ?: new RawMessage( '$1', [
$text
] );
+ $this->message = $message ?: new RawMessage( '$1', [
Message::plaintextParam( $text )
] );
$this->data = $data;
}
$this->data = $data;
}
@@
-65,8
+64,6
@@
class CommentStoreComment {
* @return CommentStoreComment
*/
public static function newUnsavedComment( $comment, array $data = null ) {
* @return CommentStoreComment
*/
public static function newUnsavedComment( $comment, array $data = null ) {
- global $wgContLang;
-
if ( $comment instanceof CommentStoreComment ) {
return $comment;
}
if ( $comment instanceof CommentStoreComment ) {
return $comment;
}
@@
-81,7
+78,8
@@
class CommentStoreComment {
if ( $comment instanceof Message ) {
$message = clone $comment;
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 );
->setInterfaceMessageFlag( true )
->text();
return new CommentStoreComment( null, $text, $message, $data );