Page MenuHomePhabricator

Resource loader should respect $wgStyleDirectory
Closed, ResolvedPublic

Description

title says it all - if you set $wgStyleDirectory = "$IP/foo" one would expect the resource loader to look in foo not skins for the bits in skins, but it has skins hardcoded.

On the other hand I personally don't see what benefit wgStyleDirectory has over using a symbolic link if you really had to have the style directory somewhere else than the default, so perhaps the global should just be removed...


Version: 1.17.x
Severity: minor

Details

Reference
bz25124

Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:16 PM
bzimport set Reference to bz25124.

cnit wrote:

wgStyleDirectory probably was useful to access skins/common, which used to contain "shared" scripts and images. However, I don't know if that is still recommended for trunk.

Ahm.. it does look weird now in Resources.php registry:

		'remoteBasePath' => $GLOBALS['wgStylePath'],
		'localBasePath' => "{$GLOBALS['IP']}/skins",

it's used for remote but not for local, should be a simple fix by putting $wgStyleDirectory there.. no ?

(In reply to comment #2)

Ahm.. it does look weird now in Resources.php registry:

'remoteBasePath' => $GLOBALS['wgStylePath'],
'localBasePath' => "{$GLOBALS['IP']}/skins",

it's used for remote but not for local, should be a simple fix by putting
$wgStyleDirectory there.. no ?

Yeah, that'll work, as long as that var has a sane default. Go for it.