r24158 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24157‎ | r24158 | r24159 >
Date:11:21, 16 July 2007
Author:robchurch
Status:old
Tags:
Comment:
Rename 'SpecialContribSubEnd' hook to more appropriate 'ContributionsToolLinks', pass user identifier as first parameter, correct misleading documentation ($nt is a Title, not a User), use standard language in release notes as for other hooks
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/SpecialContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -355,6 +355,11 @@
356356 $isbn: ISBN to show information for
357357 $output: OutputPage object in use
358358
 359+'ContributionsToolLinks': Change tool links above Special:Contributions
 360+$id: User identifier
 361+$title: User page title
 362+&$tools: Array of tool links
 363+
359364 'CustomEditor': When invoking the page editor
360365 $article: Article being edited
361366 $user: User performing the edit
@@ -556,12 +561,6 @@
557562 &$sktemplate: SkinTemplate object
558563 &$tpl: Template engine object
559564
560 -'SpecialContribsSubEnd': Right before the contribsub (the talk, log, etc.
561 -links) are added above Special:Contributions. Return not evaluated, audit only.
562 -$nt: The user whose contributions are being accessed.
563 -&$tools: An array of links that will be added above Special:Contributions,
564 -delimited by '|'.
565 -
566565 'SpecialContributionsBeforeMainOutput': Before the contributions form. Return
567566 not evaluated, audit only.
568567 $id: The id of the user whose contributions are being accessed.
Index: trunk/phase3/includes/SpecialContributions.php
@@ -362,8 +362,8 @@
363363 # Other logs link
364364 $tools[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'Log' ), wfMsgHtml( 'log' ), 'user=' . $nt->getPartialUrl() );
365365
366 - # Let extensions add to this list as they need.
367 - wfRunHooks( 'SpecialContribsSubEnd', array( $nt, &$tools ) );
 366+ wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) );
 367+
368368 $links = implode( ' | ', $tools );
369369 }
370370
Index: trunk/phase3/RELEASE-NOTES
@@ -140,8 +140,8 @@
141141 $wgAjaxLicencePreview)
142142 * New Parser::setTransparentTagHook for parser extension and template
143143 compatibility
144 -* Hook point 'SpecialContribsSubEnd' added to allow extensions to add to
145 - the links displayed above Special:Contributions.
 144+* Introduced 'ContributionsToolLinks' hook; see docs/hooks.txt for more
 145+ information
146146
147147 == Bugfixes since 1.10 ==
148148

Follow-up revisions

RevisionCommit summaryAuthorDate
r24215Merged revisions 24095-24212 via svnmerge from...david21:19, 17 July 2007

Status & tagging log