Add css $classes variable to the OldChangesListRecentChangesLine hook
authoraude <aude.wiki@gmail.com>
Thu, 10 Jan 2013 15:52:30 +0000 (15:52 +0000)
committeraude <aude.wiki@gmail.com>
Thu, 10 Jan 2013 15:52:30 +0000 (15:52 +0000)
- will update LiquidThreads accordingly and do not see
this hook used in any other extension in Wikimedia git repos.

Change-Id: Ib8f297b39dbd5fba980bb0d4773d0e01f2b922f4

docs/hooks.txt
includes/ChangesList.php

index c6630dc..8d699c1 100644 (file)
@@ -1580,6 +1580,7 @@ return false to omit the line from RecentChanges and Watchlist special pages.
 &$changeslist: The OldChangesList instance.
 &$s: HTML of the form "<li>...</li>" containing one RC entry.
 &$rc: The RecentChange object.
+&$classes: array of css classes for the <li> element
 
 'OpenSearchUrls': Called when constructing the OpenSearch description XML. Hooks
 can alter or append to the array of URLs for search & suggestion formats.
index a2fff57..e98fcac 100644 (file)
@@ -682,7 +682,7 @@ class OldChangesList extends ChangesList {
                        $classes[] = Sanitizer::escapeClass( 'watchlist-'.$rc->mAttribs['rc_namespace'].'-'.$rc->mAttribs['rc_title'] );
                }
 
-               if ( !wfRunHooks( 'OldChangesListRecentChangesLine', array( &$this, &$s, $rc ) ) ) {
+               if ( !wfRunHooks( 'OldChangesListRecentChangesLine', array( &$this, &$s, $rc, &$classes ) ) ) {
                        wfProfileOut( __METHOD__ );
                        return false;
                }