Pass $classes in the ContributionsLineEnding hook
authormlitn <git@mullie.eu>
Tue, 3 Jul 2012 17:38:09 +0000 (10:38 -0700)
committerCatrope <roan.kattouw@gmail.com>
Tue, 3 Jul 2012 17:39:21 +0000 (10:39 -0700)
Originally part of https://gerrit.wikimedia.org/r/13880

Change-Id: I05d9d13e8dc4e9442ecfba79a7d1af8bf192c28b

docs/hooks.txt
includes/specials/SpecialContributions.php

index 3744462..7df2c39 100644 (file)
@@ -705,8 +705,9 @@ $user: user (object) whose email is being confirmed
 
 'ContributionsLineEnding': Called before a contributions HTML line is finished
 $page: SpecialPage object for contributions
-$ret: the HTML line
+&$ret: the HTML line
 $row: the DB row for this line
+&$classes: the classes to add to the surrounding <li>
 
 'ContributionsToolLinks': Change tool links above Special:Contributions
 $id: User identifier
index 9465037..50192ac 100644 (file)
@@ -866,7 +866,7 @@ class ContribsPager extends ReverseChronologicalPager {
                $ret .= " $tagSummary";
 
                // Let extensions add data
-               wfRunHooks( 'ContributionsLineEnding', array( &$this, &$ret, $row ) );
+               wfRunHooks( 'ContributionsLineEnding', array( $this, &$ret, $row, &$classes ) );
 
                $classes = implode( ' ', $classes );
                $ret = "<li class=\"$classes\">$ret</li>\n";