mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
Directly use Language::factory instead of wfGetLangObj
Other places like Message::inLanguage also use Language::factory( $user->getOption( 'language' ) ). Change-Id: I911dc2319e1922276daa3eb3614a350c80b8b57f
This commit is contained in:
parent
d0714b2928
commit
99173922c1
|
@ -43,7 +43,7 @@ class MWEchoEmailBatch {
|
||||||
*/
|
*/
|
||||||
public function __construct( User $user ) {
|
public function __construct( User $user ) {
|
||||||
$this->mUser = $user;
|
$this->mUser = $user;
|
||||||
$this->language = wfGetLangObj( $this->mUser->getOption( 'language' ) );
|
$this->language = Language::factory( $this->mUser->getOption( 'language' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -108,7 +108,7 @@ class EchoNotifier {
|
||||||
*/
|
*/
|
||||||
private static function generateEmail( EchoEvent $event, User $user ) {
|
private static function generateEmail( EchoEvent $event, User $user ) {
|
||||||
$emailFormat = MWEchoNotifUser::newFromUser( $user )->getEmailFormat();
|
$emailFormat = MWEchoNotifUser::newFromUser( $user )->getEmailFormat();
|
||||||
$lang = wfGetLangObj( $user->getOption( 'language' ) );
|
$lang = Language::factory( $user->getOption( 'language' ) );
|
||||||
$formatter = new EchoPlainTextEmailFormatter( $user, $lang );
|
$formatter = new EchoPlainTextEmailFormatter( $user, $lang );
|
||||||
$content = $formatter->format( $event );
|
$content = $formatter->format( $event );
|
||||||
if ( !$content ) {
|
if ( !$content ) {
|
||||||
|
|
Loading…
Reference in a new issue