Remove deprecated method insertArticleLink() from class ChangeList
[lhc/web/wiklou.git] / includes / changes / ChangesList.php
index b1dff14..b8ab971 100644 (file)
@@ -58,8 +58,6 @@ class ChangesList extends ContextSource {
        protected $filterGroups;
 
        /**
-        * Changeslist constructor
-        *
         * @param Skin|IContextSource $obj
         * @param array $filterGroups Array of ChangesListFilterGroup objects (currently optional)
         */
@@ -454,11 +452,9 @@ class ChangesList extends ContextSource {
                        );
                }
                if ( $rc->mAttribs['rc_type'] == RC_CATEGORIZE ) {
-                       $diffhist = $diffLink . $this->message['pipe-separator'] . $this->message['hist'];
+                       $histLink = $this->message['hist'];
                } else {
-                       $diffhist = $diffLink . $this->message['pipe-separator'];
-                       # History link
-                       $diffhist .= $this->linkRenderer->makeKnownLink(
+                       $histLink = $this->linkRenderer->makeKnownLink(
                                $rc->getTitle(),
                                new HtmlArmor( $this->message['hist'] ),
                                [ 'class' => 'mw-changeslist-history' ],
@@ -469,20 +465,11 @@ class ChangesList extends ContextSource {
                        );
                }
 
-               // @todo FIXME: Hard coded ". .". Is there a message for this? Should there be?
-               $s .= $this->msg( 'parentheses' )->rawParams( $diffhist )->escaped() .
-                       ' <span class="mw-changeslist-separator">. .</span> ';
-       }
-
-       /**
-        * @param string &$s Article link will be appended to this string, in place.
-        * @param RecentChange $rc
-        * @param bool $unpatrolled
-        * @param bool $watched
-        * @deprecated since 1.27, use getArticleLink instead.
-        */
-       public function insertArticleLink( &$s, RecentChange $rc, $unpatrolled, $watched ) {
-               $s .= $this->getArticleLink( $rc, $unpatrolled, $watched );
+               $s .= Html::rawElement( 'div', [ 'class' => 'mw-changeslist-links' ],
+                               Html::rawElement( 'span', [], $diffLink ) .
+                               Html::rawElement( 'span', [], $histLink )
+                       ) .
+                       ' <span class="mw-changeslist-separator"></span> ';
        }
 
        /**
@@ -535,7 +522,7 @@ class ChangesList extends ContextSource {
                        htmlspecialchars( $this->getLanguage()->userTime(
                                $rc->mAttribs['rc_timestamp'],
                                $this->getUser()
-                       ) ) . '</span> <span class="mw-changeslist-separator">. .</span> ';
+                       ) ) . '</span> <span class="mw-changeslist-separator"></span> ';
        }
 
        /**
@@ -561,7 +548,13 @@ class ChangesList extends ContextSource {
                } else {
                        $s .= $this->getLanguage()->getDirMark() . Linker::userLink( $rc->mAttribs['rc_user'],
                                $rc->mAttribs['rc_user_text'] );
-                       $s .= Linker::userToolLinks( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
+                       $s .= Linker::userToolLinks(
+                               $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'],
+                               false, 0, null,
+                               // The text content of tools is not wrapped with parenthesises or "piped".
+                               // This will be handled in CSS (T205581).
+                               false
+                       );
                }
        }