Fix Bug 39800 Tooltip of ULS search results should be in current UI language

Change-Id: If930c2035b2bd01764d109fcb9ad8e3838fd9cb5
This commit is contained in:
Santhosh Thottingal
2012-08-30 22:21:02 +05:30
parent b586f4795e
commit 47e852f2e5

View File

@@ -116,8 +116,7 @@ class UniversalLanguageSelectorHooks {
* @return bool * @return bool
*/ */
public static function addConfig( &$vars ) { public static function addConfig( &$vars ) {
global $wgContLang, $wgULSGeoService; global $wgULSGeoService;
$vars['wgULSLanguages'] = Language::fetchLanguageNames( $wgContLang->getCode(), 'mwfile' );
$vars['wgULSGeoService'] = $wgULSGeoService; $vars['wgULSGeoService'] = $wgULSGeoService;
return true; return true;
} }
@@ -128,6 +127,7 @@ class UniversalLanguageSelectorHooks {
* @return bool * @return bool
*/ */
public static function addVariables( &$vars, OutputPage $out ) { public static function addVariables( &$vars, OutputPage $out ) {
$vars['wgULSLanguages'] = Language::fetchLanguageNames( $out->getLanguage()->getCode(), 'mwfile' );
$vars['wgULSAcceptLanguageList'] = array_keys( $out->getRequest()->getAcceptLang() ); $vars['wgULSAcceptLanguageList'] = array_keys( $out->getRequest()->getAcceptLang() );
return true; return true;
} }