From 2c0df2ef3b4766d6064087bc10c888b4332f0e16 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Sun, 8 Jun 2008 21:58:29 +0000 Subject: [PATCH] * add hook desc to hooks.txt and fix typo in LinkerMakeExternalLink hook --- docs/hooks.txt | 5 +++++ includes/Linker.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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; -- 2.20.1