Add config to enable compact links for new accounts

By default the value is false.

Change-Id: I30e9c3d929158d9ebe90edfcb10c90712ad294f9
This commit is contained in:
Santhosh Thottingal
2016-05-10 09:57:48 +05:30
parent 7a82c2fcba
commit 35e7d72e35
2 changed files with 17 additions and 1 deletions

View File

@@ -82,6 +82,19 @@ class UniversalLanguageSelectorHooks {
return false;
}
/**
* Sets user preference to enable the Compact language links if the
* user account is new.
*
* To be removed once no longer needed.
*/
public static function onLocalUserCreated( User $user, $autoCreate ) {
if ( RequestContext::getMain()->getConfig()->get( 'ULSCompactLinksForNewAccounts' ) ) {
$user->setOption( 'compact-language-links', 1 );
$user->saveSettings();
}
}
/**
* @param OutputPage $out
* @param Skin $skin