Page MenuHomePhabricator

Allow all user preferences defaults to be set in LocalSettings.php
Closed, ResolvedPublic

Description

Author: zigger

Description:
As an enhancement, all user preferences should be able to be set as site and
language defaults.

Currently DefaultSettings.php only has $wgDefaultSkin and maybe $wgAmericanDates.

Language.php has $wgDefaultUserOptionsEn, which seems to be incomplete, and
could be per user-language.


Version: 1.4.x
Severity: enhancement

Details

Reference
bz924

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 7:03 PM
bzimport set Reference to bz924.
bzimport added a subscriber: Unknown Object (MLST).

Note that languages can override the getDefaultUserOptions()
method to set additional or override global default
settings.

Changing subject line to concentrate on the site-specific setting
aspect, which I agree would be nice to do cleanly. Shouldn't be
too hard to add an override array.

Added $wgDefaultUserSettings array in 1.4:

Settings added to this array will override the language globals for
the user preferences used by anonymous visitors and newly created
accounts. (See names and sample values in languages/Language.php)

For instance, to disable section editing links:

$wgDefaultUserOptions['editsection'] = 0;