Special:Watchlist: Add user preference to "Show last" options, fix float comparison
[lhc/web/wiklou.git] / includes / specials / SpecialLinkSearch.php
index f474867..ca89776 100644 (file)
@@ -68,10 +68,9 @@ class LinkSearchPage extends QueryPage {
         * This allows for dependency injection even though we don't control object creation.
         */
        private function initServices() {
-               global $wgLanguageCode;
+               global $wgContLang;
                if ( !$this->linkRenderer ) {
-                       $lang = Language::factory( $wgLanguageCode );
-                       $titleFormatter = new MediaWikiTitleCodec( $lang, GenderCache::singleton() );
+                       $titleFormatter = new MediaWikiTitleCodec( $wgContLang, GenderCache::singleton() );
                        $this->linkRenderer = new MediaWikiPageLinkRenderer( $titleFormatter );
                }
        }