Add class to diff and history links in Special:Contributions
[lhc/web/wiklou.git] / includes / logging / LogEventsList.php
index 0cf584b..6665336 100644 (file)
@@ -23,6 +23,8 @@
  * @file
  */
 
+use MediaWiki\MediaWikiServices;
+
 class LogEventsList extends ContextSource {
        const NO_ACTION_LINK = 1;
        const NO_EXTRA_USER_LINKS = 2;
@@ -91,7 +93,7 @@ class LogEventsList extends ContextSource {
                // For B/C, we take strings, but make sure they are converted...
                $types = ( $types === '' ) ? [] : (array)$types;
 
-               $tagSelector = ChangeTags::buildTagFilterSelector( $tagFilter );
+               $tagSelector = ChangeTags::buildTagFilterSelector( $tagFilter, false, $this->getContext() );
 
                $html = Html::hidden( 'title', $title->getPrefixedDBkey() );
 
@@ -142,10 +144,11 @@ class LogEventsList extends ContextSource {
         */
        private function getFilterLinks( $filter ) {
                // show/hide links
-               $messages = [ $this->msg( 'show' )->escaped(), $this->msg( 'hide' )->escaped() ];
+               $messages = [ $this->msg( 'show' )->text(), $this->msg( 'hide' )->text() ];
                // Option value -> message mapping
                $links = [];
                $hiddens = ''; // keep track for "go" button
+               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
                foreach ( $filter as $type => $val ) {
                        // Should the below assignment be outside the foreach?
                        // Then it would have to be copied. Not certain what is more expensive.
@@ -155,7 +158,7 @@ class LogEventsList extends ContextSource {
                        $hideVal = 1 - intval( $val );
                        $query[$queryKey] = $hideVal;
 
-                       $link = Linker::linkKnown(
+                       $link = $linkRenderer->makeKnownLink(
                                $this->getTitle(),
                                $messages[$hideVal],
                                [],
@@ -672,9 +675,9 @@ class LogEventsList extends ContextSource {
                                $urlParam = array_merge( $urlParam, $extraUrlParams );
                        }
 
-                       $s .= Linker::linkKnown(
+                       $s .= MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(
                                SpecialPage::getTitleFor( 'Log' ),
-                               $context->msg( 'log-fulllog' )->escaped(),
+                               $context->msg( 'log-fulllog' )->text(),
                                [],
                                $urlParam
                        );