// Also set header tabs to be for the target.
$this->getSkin()->setRelevantTitle( $this->targetObj );
+ $linkRenderer = $this->getLinkRenderer();
$links = [];
- $links[] = Linker::linkKnown(
+ $links[] = $linkRenderer->makeKnownLink(
SpecialPage::getTitleFor( 'Log' ),
- $this->msg( 'viewpagelogs' )->escaped(),
+ $this->msg( 'viewpagelogs' )->text(),
[],
[
'page' => $this->targetObj->getPrefixedText(),
);
if ( !$this->targetObj->isSpecialPage() ) {
// Give a link to the page history
- $links[] = Linker::linkKnown(
+ $links[] = $linkRenderer->makeKnownLink(
$this->targetObj,
- $this->msg( 'pagehist' )->escaped(),
+ $this->msg( 'pagehist' )->text(),
[],
[ 'action' => 'history' ]
);
}
// Link to Special:Tags
- $links[] = Linker::linkKnown(
+ $links[] = $linkRenderer->makeKnownLink(
SpecialPage::getTitleFor( 'Tags' ),
- $this->msg( 'tags-edit-manage-link' )->escaped()
+ $this->msg( 'tags-edit-manage-link' )->text()
);
// Logs themselves don't have histories or archived revisions
$this->getOutput()->addSubtitle( $this->getLanguage()->pipeList( $links ) );
$numRevisions = 0;
// Live revisions...
$list = $this->getList();
- // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+ // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
for ( $list->reset(); $list->current(); $list->next() ) {
- // @codingStandardsIgnoreEnd
$item = $list->current();
$numRevisions++;
$out->addHTML( $item->getHTML() );
// Otherwise, use a multi-select field for adding tags, and a list of
// checkboxes for removing them
- // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+ // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
for ( $list->reset(); $list->current(); $list->next() ) {
- // @codingStandardsIgnoreEnd
$currentTags = $list->current()->getTags();
if ( $currentTags ) {
$tags = array_merge( $tags, explode( ',', $currentTags ) );
*/
protected function failure( $status ) {
$this->getOutput()->setPageTitle( $this->msg( 'actionfailed' ) );
- $this->getOutput()->addWikiText( '<div class="errorbox">' .
- $status->getWikiText( 'tags-edit-failure' ) .
- '</div>'
+ $this->getOutput()->addWikiText(
+ Html::errorBox( $status->getWikiText( 'tags-edit-failure' ) )
);
$this->showForm();
}