On Fri, Oct 23, 2009 at 11:52 PM, Benjamin Lees emufarmers@gmail.com wrote:
Is there a reason a bunch of paths get set in Setup.php, rather than DefaultSettings.php? Or rather, is there any reason not to change this?
Some problems I've seen with it:
- It's confusing—people look up a variable like $wgStylePath in
DefaultSettings.php only to find that it's false and magically gets set to "{$wgScriptPath}/skins" somewhere else.
- Because Setup.php is included after Local/DefaultSettings.php, you can't
necessarily depend on the paths that are set there For instance, setting $wgLogo in LocalSettings.php will use the wrong path unless you set $wgStylePath too or don't rely on it at all < http://www.mediawiki.org/w/index.php?title=Manual_talk:$wgStylePath&oldi... _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
If you looked more closely, you'll see that these path settings are conditionally set when the administrator does not provide a value in LocalSettings. So if you set $wgStylePath to something, it should work. If you leave it alone, it will default to $wgScriptPath/skins. I suppose it could (can it?) be done in DefaultSettings instead of Setup, but I don't think it really matters; the end result is the same.
-Chad