* Add $linkType param to LinkerMakeExternalLink
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 9 Mar 2009 13:55:45 +0000 (13:55 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 9 Mar 2009 13:55:45 +0000 (13:55 +0000)
* Move docs from r48223 to the right place.

RELEASE-NOTES
docs/hooks.txt
includes/Linker.php

index 0ffcaf0..2b69d16 100644 (file)
@@ -134,7 +134,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Added a link to Special:UserRights on Special:Contributions for privileged users
 * (bug 10336) Added new magic word {{REVISIONUSER}}, which displays the user
   name of the last user to edit the page
-* LinkerMakeExternalLink now has an $attribs parameter for link attributes
+* LinkerMakeExternalLink now has an $attribs parameter for link attributes and 
+  a $linkType parameter for the type of external link being made
 
 === Bug fixes in 1.15 ===
 * (bug 16968) Special:Upload no longer throws useless warnings.
index 54b8e4b..fae74e3 100644 (file)
@@ -831,12 +831,13 @@ $options: the options.  Will always include either 'known' or 'broken', and may
 &$url: the image url
 &$alt: the image's alt text
 &$img: the new image HTML (if returning false)
-&$attribs: the attributes to be applied.
 
 '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)
+&$attribs: the attributes to be applied.
+$linkType: The external link type
 
 'LinksUpdate': At the beginning of LinksUpdate::doUpdate() just before the actual update
 &$linksUpdate: the LinkUpdate object
index 8d3a529..e59d95e 100644 (file)
@@ -1015,7 +1015,7 @@ class Linker {
                        $text = htmlspecialchars( $text );
                }
                $link = '';
-               $success = wfRunHooks('LinkerMakeExternalLink', array( &$url, &$text, &$link, &$attribs ) );
+               $success = wfRunHooks('LinkerMakeExternalLink', array( &$url, &$text, &$link, &$attribs, $linkType ) );
                if(!$success) {
                        wfDebug("Hook LinkerMakeExternalLink changed the output of link with url {$url} and text {$text} to {$link}\n", true);
                        return $link;