From 2ecdfb37f8ee0115bfcca0768a965ea3e4d81056 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 9 Mar 2009 13:55:45 +0000 Subject: [PATCH] * Add $linkType param to LinkerMakeExternalLink * Move docs from r48223 to the right place. --- RELEASE-NOTES | 3 ++- docs/hooks.txt | 3 ++- includes/Linker.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0ffcaf03ed..2b69d16677 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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. diff --git a/docs/hooks.txt b/docs/hooks.txt index 54b8e4b219..fae74e319a 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/Linker.php b/includes/Linker.php index 8d3a529fb5..e59d95eac9 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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; -- 2.20.1