Improve the ability for extensions to participate in how MediaWiki handles url paths:
authorDaniel Friesen <dantman@users.mediawiki.org>
Fri, 12 Aug 2011 19:23:43 +0000 (19:23 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Fri, 12 Aug 2011 19:23:43 +0000 (19:23 +0000)
commit0139030f2bd03b8ebf08978ed4c1b1bbfd52b308
tree7d5f44d2ab1d4877545d3ecd4f5c0fd325673006
parentd0d89f42974030ec986b53ac38fe3aadefebf3df
Improve the ability for extensions to participate in how MediaWiki handles url paths:
- Allow extensions to hook into WebRequest::getPathInfo and add to or alter the way titles are extracted from paths
- Add a $variant argument to the GetLocalURL hook; It's always had $query, but never had $variant. As a result extensions using GetLocalURL never new if getLocalURL and have the possibility of trying to change the url in cases where they shouldn't and as a result breaking links on wiki with language variants.
- Add GetLocalURL::Internal hook for non-interwiki links. These kinds of links internally use a ugly hack for action=render and an extension using GetLocalURL can be buggy in render mode if they don't re-implement the same ugly hack that MW does. This ::Internal hook runs before the hack does so extension authors don't need to be exposed to our ugly hacky code.
- Add GetLocalURL::Article hook specifically for url tweaks to pretty urls (ie: Only when we would apply $wgArticlePath); This hook avoids the need for extensions that only want to tweak pretty url output. This hook avoids the need to make a bunch of tests for things like !$title->isExternal(), $query == '', and $variant === false which getLocalURL does and could potentially change in the future making wider GetLocalURL hooks change in function requiring extension updates.
RELEASE-NOTES-1.19
docs/hooks.txt
includes/Title.php
includes/WebRequest.php