On Wed, Mar 5, 2008 at 10:51 AM, Yaron Koren yaron57@gmail.com wrote:
Around line 348, within makeBrokenLinkObj(), under the line:
$u = $nt->escapeLocalURL( $q );
there would be added added the following:
wfRunHooks( 'BrokenLink', array( $nt, $query, &$u ));
That's not very flexible, is it? It basically allows changing one thing, $u. Why don't you put it almost at the bottom, or almost at the top, and have it be
$ret = null; if( !wfRunHooks( 'BrokenLink', array( &$nt, &$text, &$query, &$trail, &$prefix, &$ret ) ) ) { return $ret; }
If it's at the bottom, some other parameters might be passed, to avoid having to re-process everything. The top would maybe be better.
The name seems fine. Make sure you update docs/hooks.txt, whatever you do.