Initial version of geolocation support

Change-Id: Ia1a18ac336131520bbc67f52194f4aa9c547ea67
This commit is contained in:
Niklas Laxström
2012-08-30 10:23:59 +00:00
committed by Amir E. Aharoni
parent fde6b18e40
commit 64c26ad137
6 changed files with 63 additions and 9 deletions

View File

@@ -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;
}