Revert r38591 -- "Make good-faith effort to run BrokenLink hook in Linker::link(...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 5 Aug 2008 04:56:29 +0000 (04:56 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 5 Aug 2008 04:56:29 +0000 (04:56 +0000)
commitbd600419c4e0cf18694347c3f19e1df10e5c5d31
tree180b1f88234686fed3c6f8dd38b1bc78bdfd93ab
parente7d168d18b42187f19ee714f5b3d7f9341421497
Revert r38591 -- "Make good-faith effort to run BrokenLink hook in Linker::link().  No parser-test regressions, and it shouldn't change behavior unless Xml::expandAttributes() and Sanitizer::decodeTagAttributes() aren't inverses up to normalization."

IMHO this is an excellent opportunity to kill a horrible interface and replace it with a sane one. Note the only use of the BrokenLink hook currently in our SVN is in SemanticForms:

/**
 * Sets the URL for form-based adding of a nonexistent (broken-linked, AKA
 * red-linked) page
 */
function sffSetBrokenLink(&$linker, $title, $query, &$u, &$style, &$prefix, &$text, &$inside, &$trail) {
$link = sffAddDataLink($title);
if ($link != '')
$u = $link;
return true;
}

In the unlikely event that anybody else is really needing the exact hook details, I'm sure there's a much nicer, more future-friendly way to do it. Make a new hook and let these hypothetical extensions fix themselves up. :)
includes/Linker.php
includes/Xml.php