# Pre-fill content with error message so that if something
# fails we'll have something telling us what we intended.
- $this->mContent = wfMsgNoTrans( 'missing-revision', $oldid );
+ $this->mContent = wfMessage( 'missing-revision', $oldid )->plain();
if ( $oldid ) {
# $this->mRevision might already be fetched by getOldIDFromRequest()
# Show error message
$oldid = $this->getOldID();
if ( $oldid ) {
- $text = wfMsgNoTrans( 'missing-revision', $oldid );
+ $text = wfMessage( 'missing-revision', $oldid )->plain();
} elseif ( $this->getTitle()->getNamespace() === NS_MEDIAWIKI ) {
// Use the default message text
$text = $this->getTitle()->getDefaultMessageText();
} elseif ( $this->getTitle()->quickUserCan( 'create', $this->getContext()->getUser() )
&& $this->getTitle()->quickUserCan( 'edit', $this->getContext()->getUser() )
) {
- $text = wfMsgNoTrans( 'noarticletext' );
+ $text = wfMessage( 'noarticletext' )->plain();
} else {
- $text = wfMsgNoTrans( 'noarticletext-nopermission' );
+ $text = wfMessage( 'noarticletext-nopermission' )->plain();
}
$text = "<div class='noarticletext'>\n$text\n</div>";
}
$outputPage->addSubtitle( "<div id=\"mw-revision-nav\">" . $cdel .
- wfMsgExt( 'revision-nav', array( 'escapenoentities', 'parsemag', 'replaceafter' ),
- $prevdiff, $prevlink, $lnk, $curdiff, $nextlink, $nextdiff ) . "</div>" );
+ wfMessage( 'revision-nav' )->rawParams(
+ $prevdiff, $prevlink, $lnk, $curdiff, $nextlink, $nextdiff
+ )->escaped() . "</div>" );
}
/**
if ( $appendSubtitle ) {
$out = $this->getContext()->getOutput();
- $out->appendSubtitle( wfMessage( 'redirectpagesub' )->escaped() );
+ $out->addSubtitle( wfMessage( 'redirectpagesub' )->escaped() );
}
// the loop prepends the arrow image before the link, so the first case needs to be outside
$form = Xml::openElement( 'form', array( 'method' => 'post',
'action' => $this->getTitle()->getLocalURL( 'action=delete' ), 'id' => 'deleteconfirm' ) ) .
Xml::openElement( 'fieldset', array( 'id' => 'mw-delete-table' ) ) .
- Xml::tags( 'legend', null, wfMsgExt( 'delete-legend', array( 'parsemag', 'escapenoentities' ) ) ) .
+ Xml::tags( 'legend', null, wfMessage( 'delete-legend' )->escaped() ) .
Xml::openElement( 'table', array( 'id' => 'mw-deleteconfirm-table' ) ) .
"<tr id=\"wpDeleteReasonListRow\">
<td class='mw-label'>" .
$outputPage->setPageTitle( wfMessage( 'actioncomplete' ) );
$outputPage->setRobotPolicy( 'noindex,nofollow' );
- $loglink = '[[Special:Log/delete|' . wfMsgNoTrans( 'deletionlog' ) . ']]';
+ $loglink = '[[Special:Log/delete|' . wfMessage( 'deletionlog' )->text() . ']]';
$outputPage->addWikiMsg( 'deletedtext', wfEscapeWikiText( $deleted ), $loglink );
$outputPage->returnToMain( false );
} else {
$outputPage->setPageTitle( wfMessage( 'cannotdelete-title', $this->getTitle()->getPrefixedText() ) );
if ( $error == '' ) {
- $errors = $status->getErrorsArray();
- $deleteLogPage = new LogPage( 'delete' );
- $outputPage->wrapWikiMsg( "<div class=\"error mw-error-cannotdelete\">\n$1\n</div>",
- $errors[0]
+ $outputPage->addWikiText(
+ "<div class=\"error mw-error-cannotdelete\">\n" . $status->getWikiText() . "\n</div>"
);
+ $deleteLogPage = new LogPage( 'delete' );
$outputPage->addHTML( Xml::element( 'h2', null, $deleteLogPage->getName()->text() ) );
LogEventsList::showLogExtract(
* @return ParserOutput or false if the given revsion ID is not found
*/
public function getParserOutput( $oldid = null, User $user = null ) {
- $user = is_null( $user ) ? $this->getContext()->getUser() : $user;
- $parserOptions = $this->mPage->makeParserOptions( $user );
+ if ( $user === null ) {
+ $parserOptions = $this->getParserOptions();
+ } else {
+ $parserOptions = $this->mPage->makeParserOptions( $user );
+ }
return $this->mPage->getParserOutput( $parserOptions, $oldid );
}
*/
public function getParserOptions() {
if ( !$this->mParserOptions ) {
- $this->mParserOptions = $this->mPage->makeParserOptions( $this->getContext()->getUser() );
+ $this->mParserOptions = $this->mPage->makeParserOptions( $this->getContext() );
}
// Clone to allow modifications of the return value without affecting cache
return clone $this->mParserOptions;