On 11-06-01 07:03 PM, Jeroen De Dauw wrote:
Hey,
The getSkin method of the User class has been deprecated in MW 1.18, but is still in use on a lot of places. I want to take care of this in the extensions I maintain, but it's not clear to me what to replace it with in parser functions and tag extensions. The deprecation notice states you should use the most relevant RequestContext. How can this be obtained from inside a parser function or tag extension? I did several searches through trunk and the extensions I've checked out, but did not find any parser hooks using this yet.
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Parser functions and tag extensions should not be making use of the Skin, we don't fragment the cache by skin so that could lead to bugs where one skin's visual modifications polute the parser cached content displayed in another skin.
If you want the linker you should either use static Linker:: methods or use the DummyLinker directly. A good way to use the linker in a way compatible with changes would be: $linker = class_exists('DummyLinker') ? new DummyLinker : new Linker;
Then you can call all the linker methods in an instance way. When you drop pre-static-linker compatibility you can change all those $linker-> calls directly to Linker::