Last modified: 2009-07-26 16:54:24 UTC
Extension stylesheets are found in the path_to_mw/extensions/ExtensionName/ directory, not path_to_mw/skins/ like core stylesheets. Hence the provision of two separate worker functions in wgOut, addStyle() and addExtensionStyle(). However, they appear to then go through the same mangle and the extension styles still end up with both the path_to_mw/skins/ directory prefix, and the $wgStyleVersion suffix, that are added to core styles. Something's not right there.
Seems ok to me. As long as extensions are passing their path as either a full URL (with protocol) or relative from the docroot (ie /extensions/MyExt/whatever.css) they should be fine (see line 1941 on HEAD, r53780). Only if the style relative from the current location (ie: MyExt/whatever.css) will it fail, because then styleLink() goes ahead and adds all the stuff you mention, including $wgStylePath. Checked all extensions in MW SVN that call this, and they all seem to be ok, if they aren't those are individual bugs. WORKSFORME, no real issue with addExtensionStyle() here.
Created attachment 6391 [details] Document OutputPage::addExtensionStyle() Ah, I see. Needs documenting, then; here's a suggestion.