Initial version of geolocation support
Change-Id: Ia1a18ac336131520bbc67f52194f4aa9c547ea67
This commit is contained in:
committed by
Amir E. Aharoni
parent
fde6b18e40
commit
64c26ad137
@@ -27,7 +27,11 @@ class UniversalLanguageSelectorHooks {
|
||||
* @return bool
|
||||
*/
|
||||
public static function addModules( $out, $skin ) {
|
||||
global $wgULSGeoService;
|
||||
$out->addModules( 'ext.uls.init' );
|
||||
if ( $wgULSGeoService ) {
|
||||
$out->addModules( 'ext.uls.geoclient' );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -112,8 +116,9 @@ class UniversalLanguageSelectorHooks {
|
||||
* @return bool
|
||||
*/
|
||||
public static function addConfig( &$vars ) {
|
||||
global $wgContLang;
|
||||
global $wgContLang, $wgULSGeoService;
|
||||
$vars['wgULSLanguages'] = Language::fetchLanguageNames( $wgContLang->getCode(), 'mwfile' );
|
||||
$vars['wgULSGeoService'] = $wgULSGeoService;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user