Let EnhancedChangesListModifyLineData Hook change classes as well

Change-Id: I7c2ae57bd3b18c26b12dd36e331deb6af5fa36c2
This commit is contained in:
amir 2016-03-28 09:28:11 +04:30 committed by Amir Sarabadani
parent ac670cf94b
commit 1a54516530
2 changed files with 3 additions and 1 deletions

View file

@ -1350,6 +1350,7 @@ $changesList: EnhancedChangesList object
&$data: An array with all the components that will be joined in order to create the line
$block: An array of RecentChange objects in that block
$rc: The RecentChange object for this line
&$classes: An array of classes to change
'EnhancedChangesListModifyBlockLineData': to alter data used to build
a non-grouped recent change line in EnhancedChangesList.

View file

@ -369,6 +369,7 @@ class EnhancedChangesList extends ChangesList {
) {
$lineParams['classes'] = [ 'mw-enhanced-watched' ];
}
$separator = ' <span class="mw-changeslist-separator">. .</span> ';
$data['recentChangesFlags'] = [
@ -442,7 +443,7 @@ class EnhancedChangesList extends ChangesList {
// give the hook a chance to modify the data
$success = Hooks::run( 'EnhancedChangesListModifyLineData',
[ $this, &$data, $block, $rcObj ] );
[ $this, &$data, $block, $rcObj, &$classes ] );
if ( !$success ) {
// skip entry if hook aborted it
return [];