Merge "Use LogFormatter::getLinkRenderer in LogFormatter extensions"
[lhc/web/wiklou.git] / includes / logging / LogFormatter.php
index 0f1e1f7..ab7c5cb 100644 (file)
@@ -644,12 +644,13 @@ class LogFormatter {
         * @return string
         */
        protected function makePageLink( Title $title = null, $parameters = [], $html = null ) {
+               if ( !$title instanceof Title ) {
+                       throw new MWException( 'Expected title, got null' );
+               }
                if ( !$this->plaintext ) {
-                       $link = Linker::link( $title, $html, [], $parameters );
+                       $html = $html !== null ? new HtmlArmor( $html ) : $html;
+                       $link = $this->getLinkRenderer()->makeLink( $title, $html, [], $parameters );
                } else {
-                       if ( !$title instanceof Title ) {
-                               throw new MWException( "Expected title, got null" );
-                       }
                        $link = '[[' . $title->getPrefixedText() . ']]';
                }