$htmlArgs = array_map( 'htmlspecialchars', $args );
$htmlArgs = array_map( 'nl2br', $htmlArgs );
- $this->htmlMsg = wfMsgReplaceArgs( htmlspecialchars( wfMsgGetKey( $msg, true ) ), $htmlArgs );
- $this->textMsg = wfMsgReal( $msg, $args );
+ $this->htmlMsg = wfMessage( $msg )->rawParams( $htmlArgs )->escaped();
+ $this->textMsg = wfMessage( $msg )->rawParams( $htmlArgs )->text();
$this->width = intval( $width );
$this->height = intval( $height );
$this->url = false;
static function intFunction( $parser, $part1 = '' /*, ... */ ) {
if ( strval( $part1 ) !== '' ) {
$args = array_slice( func_get_args(), 2 );
- $message = wfMsgGetKey( $part1, true, $parser->getOptions()->getUserLang(), false );
- $message = wfMsgReplaceArgs( $message, $args );
+ $message = wfMessage( $part1, $args )->inLanguage( $parser->getOptions()->getUserLang() )->plain();
$message = $parser->replaceVariables( $message ); // like MessageCache::transform()
return $message;
} else {
( $descending && ( $key < $offset || !$offset ) || !$descending && $key > $offset ) &&
( ( $this->prefix && preg_match( $this->prefix, $key ) ) || $this->prefix === false )
){
+ $actual = wfMessage( $key )->inLanguage( $this->langcode )->plain();
+ $default = wfMessage( $key )->inLanguage( $this->langcode )->useDatabase( false )->plain();
$result->result[] = array(
'am_title' => $key,
- 'am_actual' => wfMsgGetKey( $key, /*useDB*/true, $this->langcode, false ),
- 'am_default' => wfMsgGetKey( $key, /*useDB*/false, $this->langcode, false ),
+ 'am_actual' => $actual,
+ 'am_default' => $default,
'am_customised' => $customised,
'am_talk_exists' => isset( $statuses['talks'][$key] )
);