* add hook desc to hooks.txt and fix typo in LinkerMakeExternalLink hook
authorRyan Schmidt <skizzerz@users.mediawiki.org>
Sun, 8 Jun 2008 21:58:29 +0000 (21:58 +0000)
committerRyan Schmidt <skizzerz@users.mediawiki.org>
Sun, 8 Jun 2008 21:58:29 +0000 (21:58 +0000)
docs/hooks.txt
includes/Linker.php

index e13c1ee..8451d61 100644 (file)
@@ -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
 
index cdfb6bb..9cf8790 100644 (file)
@@ -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;