Platonides wrote: No. Only those (and all of them) that contain another $wgVariable into its default value.
OK, that makes sense now, thanks for the explanation.
I think it is only confusing if you look at DefaultSettings expecting to see the default there and can't find it.
I think that's a separate issue, but it certainly is making things worse.
Let's see if I understand correctly: 1. DefaultSettings.php is run. Here all variables are set to the default values, *except* those that are dependent on other variables, which are set to false (as a placeholder). 2. LocalSettings.php is run. Here users can set any variables to whatever they like. 3. Setup.php is run. Here any variables that are dependent on other variables *and* that have not been customised in LocalSettings.php are set to their default value, based on other variables that may or may not have been changed in LocalSettings.php
If this is correct, I think the documentation does not make it clear. Here are the changes I propose.
DefaultSettings.php, line 10, reads
* Note that since all these string interpolations are expanded * before LocalSettings is included, if you localize something * like $wgScriptPath, you must also localize everything that * depends on it.
If my understanding is correct, then this is not only confusing, it is wrong. I propose something like the following instead
* In this file, variables whose default values depend on other * variables (for example $wgStylePath, which defaults to * "{$wgScriptPath}/skins") are set to false. * The sequence of execution is DefaultSettings.php > LocalSettings.php > Setup.php * The actual default value of these variables will only be set in Setup.php, * taking into account any custom settings performed in LocalSettings.php.
Also in DefaultSettings.php, I propose changing these comments
$wgStylePath = false; ///< defaults to "{$wgScriptPath}/skins"
to something like
$wgStylePath = false; ///< will default to "{$wgScriptPath}/skins" in Setup.php
Here there is a minor point of mantainability, in that if the default value changes we need to change it both in Setup.php, DefaultSettings.php and on the Manual page in MediaWiki's wiki. Let's sidestep this issue for now.
Then there are the Manual pages. I propose the following note is included in the Manual pages *of each variable* that has this behaviour.
<small>(Note: Since the defult value of this variable depends on other variables, such default value is set in Setup.php, after LocalSettings.php is executed)</small>
If there are no objections, I'm happy to apply the changes to the Manual. For the code comments, please let me know how to submit the patches. Thanks.