Merge "Make SpecialContributionsBeforeMainOutput hook more useful"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 21 Dec 2013 12:23:06 +0000 (12:23 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 21 Dec 2013 12:23:06 +0000 (12:23 +0000)
docs/hooks.txt
includes/specials/SpecialContributions.php

index 53382f4..ebc412b 100644 (file)
@@ -2208,7 +2208,9 @@ $sp: SpecialPage object, for context
 &$fields: Current HTMLForm fields
 
 'SpecialContributionsBeforeMainOutput': Before the form on Special:Contributions
-$id: User identifier
+$id: User id number, only provided for backwards-compatability
+$user: User object representing user contributions are being fetched for
+$sp: SpecialPage instance, providing context
 
 'SpecialListusersDefaultQuery': Called right before the end of
 UsersPager::getDefaultQuery().
index af6a35b..551b972 100644 (file)
@@ -168,7 +168,7 @@ class SpecialContributions extends SpecialPage {
                // Add RSS/atom links
                $this->addFeedLinks( array( 'action' => 'feedcontributions', 'user' => $target ) );
 
-               if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id ) ) ) {
+               if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id, $userObj, $this ) ) ) {
                        $out->addHTML( $this->getForm() );
 
                        $pager = new ContribsPager( $this->getContext(), array(