Merge "Localize namespaces to inh"
[lhc/web/wiklou.git] / includes / specials / SpecialEditTags.php
index 252d076..9623953 100644 (file)
@@ -158,10 +158,11 @@ class SpecialEditTags extends UnlistedSpecialPage {
                        // 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(),
@@ -170,17 +171,17 @@ class SpecialEditTags extends UnlistedSpecialPage {
                        );
                        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 ) );
@@ -221,9 +222,8 @@ class SpecialEditTags extends UnlistedSpecialPage {
                $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() );
@@ -309,9 +309,8 @@ class SpecialEditTags extends UnlistedSpecialPage {
                        // 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 ) );
@@ -450,9 +449,8 @@ class SpecialEditTags extends UnlistedSpecialPage {
         */
        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();
        }