[Mediawiki-l] Default path settings

Chad innocentkiller at gmail.com
Sat Oct 24 04:05:47 UTC 2009


On Fri, Oct 23, 2009 at 11:52 PM, Benjamin Lees <emufarmers at 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&oldid=282848
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at 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



More information about the MediaWiki-l mailing list