From: Brion Vibber Date: Sun, 21 Nov 2004 07:51:41 +0000 (+0000) Subject: (bug 924) $wgDefaultUserOptions to set the preference defaults from LocalSettings X-Git-Tag: 1.5.0alpha1~1290 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=77653c7df3f19641b558d4edf45fb42f3b9101af;p=lhc%2Fweb%2Fwiklou.git (bug 924) $wgDefaultUserOptions to set the preference defaults from LocalSettings --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 1d5c0fb7fe..70643b7f3e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -694,9 +694,18 @@ $wgTidyBin = 'tidy'; $wgTidyConf = $IP.'/extensions/tidy/tidy.conf'; $wgTidyOpts = ''; -# See list of skins and their symbolic names in language/Language.php +# See list of skins and their symbolic names in languagel/Language.php $wgDefaultSkin = 'monobook'; +# 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; +# +$wgDefaultUserOptions = array(); + # Whether or not to allow real name fields. Defaults to true. $wgAllowRealName = true; diff --git a/includes/User.php b/includes/User.php index b6f4238f1a..6402b576f6 100644 --- a/includes/User.php +++ b/includes/User.php @@ -169,7 +169,10 @@ class User { */ function loadDefaultFromLanguage(){ global $wgContLang; - $defOpt = $wgContLang->getDefaultUserOptions() ; + global $wgDefaultUserOptions; + + # Site defaults will override the global/language defaults + $defOpt = $wgDefaultUserOptions + $wgContLang->getDefaultUserOptions(); foreach ( $defOpt as $oname => $val ) { $this->mOptions[$oname] = $val; }