Special:LinkSearch: display links to pages in content language
authorayush_garg <ayush.ce13@iitp.ac.in>
Tue, 31 Mar 2015 10:51:36 +0000 (16:21 +0530)
committerayush_garg <ayush.ce13@iitp.ac.in>
Wed, 1 Apr 2015 04:12:07 +0000 (09:42 +0530)
Bug: T66064
Change-Id: Ib2af28bec7b9c6ec01c5628be07e1280cbbd2f83

includes/specials/SpecialLinkSearch.php

index 20aac18..75ff8f3 100644 (file)
@@ -68,8 +68,9 @@ class LinkSearchPage extends QueryPage {
         * This allows for dependency injection even though we don't control object creation.
         */
        private function initServices() {
+               global $wgLanguageCode;
                if ( !$this->linkRenderer ) {
-                       $lang = $this->getContext()->getLanguage();
+                       $lang = Language::factory( $wgLanguageCode );
                        $titleFormatter = new MediaWikiTitleCodec( $lang, GenderCache::singleton() );
                        $this->linkRenderer = new MediaWikiPageLinkRenderer( $titleFormatter );
                }