);
}
$revs = $this->msg( 'undeleterevisions' )->numParams( $row->count )->parse();
- $out->addHTML( "<li class='undeleteResult'>{$item} ({$revs})</li>\n" );
+ $out->addHTML(
+ Html::rawElement(
+ 'li',
+ [ 'class' => 'undeleteResult' ],
+ "{$item} ({$revs})"
+ )
+ );
}
$result->free();
$out->addHTML( "</ul>\n" );
}
}
- $out->addHTML( $this->msg( 'undelete-revision' )->rawParams( $link )->params(
- $time )->rawParams( $userLink )->params( $d, $t )->parse() . '</div>' );
+ $out->addWikiMsg(
+ 'undelete-revision',
+ Message::rawParam( $link ), $time,
+ Message::rawParam( $userLink ), $d, $t
+ );
+ $out->addHtml( '</div>' );
if ( !Hooks::run( 'UndeleteShowRevision', [ $this->mTargetObj, $rev ] ) ) {
return;
$diffContext->setWikiPage( WikiPage::factory( $currentRev->getTitle() ) );
$diffEngine = $currentRev->getContentHandler()->createDifferenceEngine( $diffContext );
+ $diffEngine->setRevisions( $previousRev->getRevisionRecord(), $currentRev->getRevisionRecord() );
$diffEngine->showDiffStyle();
-
- $formattedDiff = $diffEngine->generateContentDiffBody(
- $previousRev->getContent( Revision::FOR_THIS_USER, $this->getUser() ),
- $currentRev->getContent( Revision::FOR_THIS_USER, $this->getUser() )
- );
-
- $formattedDiff = $diffEngine->addHeader(
- $formattedDiff,
+ $formattedDiff = $diffEngine->getDiff(
$this->diffHeader( $previousRev, 'o' ),
$this->diffHeader( $currentRev, 'n' )
);
}
$link = $this->getLinkRenderer()->makeKnownLink( $this->mTargetObj );
- $out->addHTML( $this->msg( 'undeletedpage' )->rawParams( $link )->parse() );
+ $out->addWikiMsg( 'undeletedpage', Message::rawParam( $link ) );
} else {
$out->setPageTitle( $this->msg( 'undelete-error' ) );
}
// Show revision undeletion warnings and errors
$status = $archive->getRevisionStatus();
if ( $status && !$status->isGood() ) {
- $out->addWikiTextAsInterface( '<div class="error" id="mw-error-cannotundelete">' .
+ $out->wrapWikiTextAsInterface(
+ 'error',
+ '<div id="mw-error-cannotundelete">' .
$status->getWikiText(
'cannotundelete',
'cannotundelete'
// Show file undeletion warnings and errors
$status = $archive->getFileStatus();
if ( $status && !$status->isGood() ) {
- $out->addWikiTextAsInterface( '<div class="error">' .
+ $out->wrapWikiTextAsInterface(
+ 'error',
$status->getWikiText(
'undelete-error-short',
'undelete-error-long'
- ) . '</div>'
+ )
);
}
}