Merge "RCFilters: Export config vars in the RL modules where possible (take 2)"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 21 Feb 2019 21:57:49 +0000 (21:57 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 21 Feb 2019 21:57:49 +0000 (21:57 +0000)
1  2 
includes/specialpage/ChangesListSpecialPage.php
resources/src/mediawiki.rcfilters/Controller.js

@@@ -851,9 -856,17 +856,13 @@@ abstract class ChangesListSpecialPage e
                                $tagStats = ChangeTags::tagUsageStatistics();
                                $tagHitCounts = array_merge( $explicitlyDefinedTags, $softwareActivatedTags, $tagStats );
  
 -                              // Sort by hits
 -                              arsort( $tagHitCounts );
 -                              */
 -                              $tagHitCounts = array_merge( $explicitlyDefinedTags, $softwareActivatedTags );
 +                              // Sort by hits (disabled for now)
 +                              //arsort( $tagHitCounts );
  
+                               // HACK work around ChangeTags::truncateTagDescription() requiring a RequestContext
+                               $fakeContext = RequestContext::newExtraneousContext( Title::newFromText( 'Dwimmerlaik' ) );
+                               $fakeContext->setLanguage( Language::factory( $context->getLanguage() ) );
                                // Build the list and data
                                $result = [];
                                foreach ( $tagHitCounts as $tagName => $hits ) {