r48226 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48225‎ | r48226 | r48227 >
Date:13:55, 9 March 2009
Author:demon
Status:resolved
Tags:
Comment:
* Add $linkType param to LinkerMakeExternalLink
* Move docs from r48223 to the right place.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -831,12 +831,13 @@
832832 &$url: the image url
833833 &$alt: the image's alt text
834834 &$img: the new image HTML (if returning false)
835 -&$attribs: the attributes to be applied.
836835
837836 'LinkerMakeExternalLink': At the end of Linker::makeExternalLink() just before the return
838837 &$url: the link url
839838 &$text: the link text
840839 &$link: the new link HTML (if returning false)
 840+&$attribs: the attributes to be applied.
 841+$linkType: The external link type
841842
842843 'LinksUpdate': At the beginning of LinksUpdate::doUpdate() just before the actual update
843844 &$linksUpdate: the LinkUpdate object
Index: trunk/phase3/includes/Linker.php
@@ -1015,7 +1015,7 @@
10161016 $text = htmlspecialchars( $text );
10171017 }
10181018 $link = '';
1019 - $success = wfRunHooks('LinkerMakeExternalLink', array( &$url, &$text, &$link, &$attribs ) );
 1019+ $success = wfRunHooks('LinkerMakeExternalLink', array( &$url, &$text, &$link, &$attribs, $linkType ) );
10201020 if(!$success) {
10211021 wfDebug("Hook LinkerMakeExternalLink changed the output of link with url {$url} and text {$text} to {$link}\n", true);
10221022 return $link;
Index: trunk/phase3/RELEASE-NOTES
@@ -134,7 +134,8 @@
135135 * Added a link to Special:UserRights on Special:Contributions for privileged users
136136 * (bug 10336) Added new magic word {{REVISIONUSER}}, which displays the user
137137 name of the last user to edit the page
138 -* LinkerMakeExternalLink now has an $attribs parameter for link attributes
 138+* LinkerMakeExternalLink now has an $attribs parameter for link attributes and
 139+ a $linkType parameter for the type of external link being made
139140
140141 === Bug fixes in 1.15 ===
141142 * (bug 16968) Special:Upload no longer throws useless warnings.

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r48223Add $attribs as a param to LinkerMakeExternalLink Hook.werdna13:21, 9 March 2009

Status & tagging log