r6317 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r6316‎ | r6317 | r6318 >
Date:07:51, 21 November 2004
Author:vibber
Status:old
Tags:
Comment:
(bug 924) $wgDefaultUserOptions to set the preference defaults from LocalSettings
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -169,7 +169,10 @@
170170 */
171171 function loadDefaultFromLanguage(){
172172 global $wgContLang;
173 - $defOpt = $wgContLang->getDefaultUserOptions() ;
 173+ global $wgDefaultUserOptions;
 174+
 175+ # Site defaults will override the global/language defaults
 176+ $defOpt = $wgDefaultUserOptions + $wgContLang->getDefaultUserOptions();
174177 foreach ( $defOpt as $oname => $val ) {
175178 $this->mOptions[$oname] = $val;
176179 }
Index: trunk/phase3/includes/DefaultSettings.php
@@ -694,9 +694,18 @@
695695 $wgTidyConf = $IP.'/extensions/tidy/tidy.conf';
696696 $wgTidyOpts = '';
697697
698 -# See list of skins and their symbolic names in language/Language.php
 698+# See list of skins and their symbolic names in languagel/Language.php
699699 $wgDefaultSkin = 'monobook';
700700
 701+# Settings added to this array will override the language globals for
 702+# the user preferences used by anonymous visitors and newly created
 703+# accounts. (See names and sample values in languages/Language.php)
 704+#
 705+# For instance, to disable section editing links:
 706+# $wgDefaultUserOptions['editsection'] = 0;
 707+#
 708+$wgDefaultUserOptions = array();
 709+
701710 # Whether or not to allow real name fields. Defaults to true.
702711 $wgAllowRealName = true;
703712

Status & tagging log