Setup: Remove various Profile sections
[lhc/web/wiklou.git] / includes / logging / LogFormatter.php
index 0f1e1f7..0ffe691 100644 (file)
@@ -108,6 +108,12 @@ class LogFormatter {
         */
        private $linkRenderer;
 
+       /**
+        * @see LogFormatter::getMessageParameters
+        * @var array
+        */
+       protected $parsedParameters;
+
        protected function __construct( LogEntry $entry ) {
                $this->entry = $entry;
                $this->context = RequestContext::getMain();
@@ -193,7 +199,7 @@ class LogFormatter {
        }
 
        /**
-        * Even uglier hack to maintain backwards compatibilty with IRC bots
+        * Even uglier hack to maintain backwards compatibility with IRC bots
         * (T36508).
         * @see getActionText()
         * @return string Text
@@ -214,7 +220,7 @@ class LogFormatter {
        }
 
        /**
-        * Even uglier hack to maintain backwards compatibilty with IRC bots
+        * Even uglier hack to maintain backwards compatibility with IRC bots
         * (T36508).
         * @see getActionText()
         * @return string Text
@@ -261,19 +267,15 @@ class LogFormatter {
                                                $text = wfMessage( 'undeletedarticle' )
                                                        ->rawParams( $target )->inContentLanguage()->escaped();
                                                break;
-                                       // @codingStandardsIgnoreStart Long line
                                        //case 'revision': // Revision deletion
                                        //case 'event': // Log deletion
                                        // see https://github.com/wikimedia/mediawiki/commit/a9c243b7b5289dad204278dbe7ed571fd914e395
                                        //default:
-                                       // @codingStandardsIgnoreEnd
                                }
                                break;
 
                        case 'patrol':
-                               // @codingStandardsIgnoreStart Long line
                                // https://github.com/wikimedia/mediawiki/commit/1a05f8faf78675dc85984f27f355b8825b43efff
-                               // @codingStandardsIgnoreEnd
                                // Create a diff link to the patrolled revision
                                if ( $entry->getSubtype() === 'patrol' ) {
                                        $diffLink = htmlspecialchars(
@@ -644,12 +646,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() . ']]';
                }