(bug 41763) Add a hook for support uls-preferences

Change-Id: I8fdc1a0527c9a99b6e5eb95c183955a162233b1d
This commit is contained in:
Amir E. Aharoni
2012-12-06 00:30:01 +02:00
parent 3b16b20695
commit 027776c85f
3 changed files with 22 additions and 8 deletions

View File

@@ -71,14 +71,14 @@ $wgULSLanguageDetection = true;
/**
* Enable language selection. If language selection is disabled, the classes
* and RL modules are registered for the use of other extensions, but no
* language selection toolbar is shown, and it will not be possible to change
* language selection toolbar is shown, and it will not be possible to change
* the interface language using a cookie.
*/
$wgULSEnable = true;
/**
* Enable ULS language selection for anonymous users. Equivalent to $wgULSEnable
* except that it only applies to anonymous users. Setting this to false will
* except that it only applies to anonymous users. Setting this to false will
* avoid breaking Squid caches (see bug 41451).
*/
$wgULSEnableAnon = true;
@@ -101,6 +101,9 @@ $wgHooks['MakeGlobalVariablesScript'][] = 'UniversalLanguageSelectorHooks::addVa
$wgAPIModules['languagesearch'] = 'ApiLanguageSearch';
$wgHooks['UserGetLanguageObject'][] = 'UniversalLanguageSelectorHooks::getLanguage';
$wgDefaultUserOptions['uls-preferences'] = '';
$wgHooks['GetPreferences'][] = 'UniversalLanguageSelectorHooks::onGetPreferences';
$wgResourceModules['ext.uls.init'] = array(
'scripts' => 'resources/js/ext.uls.init.js',
'styles' => 'resources/css/ext.uls.css',