From: Ryan Schmidt Date: Sun, 8 Jun 2008 21:58:29 +0000 (+0000) Subject: * add hook desc to hooks.txt and fix typo in LinkerMakeExternalLink hook X-Git-Tag: 1.31.0-rc.0~47108 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=2c0df2ef3b4766d6064087bc10c888b4332f0e16;p=lhc%2Fweb%2Fwiklou.git * add hook desc to hooks.txt and fix typo in LinkerMakeExternalLink hook --- diff --git a/docs/hooks.txt b/docs/hooks.txt index e13c1ee6c5..8451d61f80 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -728,6 +728,11 @@ $lang: laguage code (string) $specialPageAliases: associative array of magic words synonyms $lang: laguage code (string) +'LinkerMakeExternalLink': At the end of Linker::makeExternalLink() just before the return +&$url: the link url +&$text: the link text +&$link: the new link HTML (if returning false) + 'LinksUpdate': At the beginning of LinksUpdate::doUpdate() just before the actual update &$linksUpdate: the LinkUpdate object diff --git a/includes/Linker.php b/includes/Linker.php index cdfb6bbdaa..9cf8790d44 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -821,7 +821,7 @@ class Linker { $text = htmlspecialchars( $text ); } $link = ''; - $success = wfRunHooks('LinkerMakeExternalLink', array( &$url, &$text, &link ) ); + $success = wfRunHooks('LinkerMakeExternalLink', array( &$url, &$text, &$link ) ); if(!$success) { wfDebug("Hook LinkerMakeExternalLink changed the output of link with url {$url} and text {$text} to {$link}", true); return $link;