Add user preference to enable ULS

Adds an option, 'enable-uls' for users to enable ULS. By default
it is enabled. Wikis can use $wgHiddenPrefs to prevent users from
disabling ULS.

Bug: 46306
Change-Id: I71b70d8ee7c3cad7f49b32e5dc494ef4fc1bdb2f
This commit is contained in:
Kunal Mehta
2013-10-29 12:16:59 -07:00
committed by Ori Livneh
parent 4b3f2a9f10
commit ad9caf32be
3 changed files with 19 additions and 2 deletions

View File

@@ -195,6 +195,7 @@ $GLOBALS['wgHooks']['SkinTemplateOutputPageBeforeExec'][] =
$GLOBALS['wgHooks']['EnterMobileMode'][] = 'UniversalLanguageSelectorHooks::onEnterMobileMode';
$GLOBALS['wgDefaultUserOptions']['uls-preferences'] = '';
$GLOBALS['wgDefaultUserOptions']['uls-enable'] = '';
$GLOBALS['wgHooks']['GetPreferences'][] = 'UniversalLanguageSelectorHooks::onGetPreferences';
$GLOBALS['wgExtensionFunctions'][] = function () {