Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / includes / specials / SpecialWhatlinkshere.php
index 1ead290..439b6ab 100644 (file)
@@ -327,7 +327,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                        $query = [];
                }
 
-               $link = Linker::linkKnown(
+               $link = $this->getLinkRenderer()->makeKnownLink(
                        $nt,
                        null,
                        $row->page_is_redirect ? [ 'class' => 'mw-redirect' ] : [],
@@ -376,9 +376,15 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                        $title = $this->getPageTitle();
                }
 
+               $linkRenderer = $this->getLinkRenderer();
+
+               if ( $text !== null ) {
+                       $text = new HtmlArmor( $text );
+               }
+
                // always show a "<- Links" link
                $links = [
-                       'links' => Linker::linkKnown(
+                       'links' => $linkRenderer->makeKnownLink(
                                $title,
                                $text,
                                [],
@@ -393,7 +399,11 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
                        // check, if the content model is editable through action=edit
                        ContentHandler::getForTitle( $target )->supportsDirectEditing()
                ) {
-                       $links['edit'] = Linker::linkKnown(
+                       if ( $editText !== null ) {
+                               $editText = new HtmlArmor( $editText );
+                       }
+
+                       $links['edit'] = $linkRenderer->makeKnownLink(
                                $target,
                                $editText,
                                [],
@@ -406,7 +416,11 @@ class SpecialWhatLinksHere extends IncludableSpecialPage {
        }
 
        function makeSelfLink( $text, $query ) {
-               return Linker::linkKnown(
+               if ( $text !== null ) {
+                       $text = new HtmlArmor( $text );
+               }
+
+               return $this->getLinkRenderer()->makeKnownLink(
                        $this->selfTitle,
                        $text,
                        [],