Linker::doEditSectionLink() and Linker::doEditSectionLinkForOther() and their respect...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 28 Jul 2008 20:33:43 +0000 (20:33 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 28 Jul 2008 20:33:43 +0000 (20:33 +0000)
commit34bf34d92361b40010f2c34927578c012018e878
treecd23cec9b50fb71e587fe06a2d905df182e2da84
parentcd8fb85d1dd90952f309c33959a6e8b16b96c947
Linker::doEditSectionLink() and Linker::doEditSectionLinkForOther() and their respective hooks are redundant and confusing.  They do exactly the same thing with a slightly different interface.  Their hooks are not only redundant but relatively ineffective, because they wrap in brackets and a span *after* the hook returns.  This makes them useless for, e.g., changing the section edit link to an image (can't remove brackets), or using any block-level element (wrapped in a span).

Make Linker::doEditSectionLink() public, and change its interface to be like that of editSectionLink().  Use that in Parser (which is the only place that uses the old functions that I can find), and mark the old two functions deprecated.  Add a hook 'DoEditSectionLink' with a new, clean interface, which is run immediately before the return so it can override the whole function.  Advise people in hooks.txt to use the new hook, not the old ones.
RELEASE-NOTES
docs/hooks.txt
includes/Linker.php
includes/parser/Parser.php