From 1a5451653066a02e7cd08f03844a8b035b09ea62 Mon Sep 17 00:00:00 2001 From: amir Date: Mon, 28 Mar 2016 09:28:11 +0430 Subject: [PATCH] Let EnhancedChangesListModifyLineData Hook change classes as well Change-Id: I7c2ae57bd3b18c26b12dd36e331deb6af5fa36c2 --- docs/hooks.txt | 1 + includes/changes/EnhancedChangesList.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index 5c69d2aac0..1d118939cd 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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. diff --git a/includes/changes/EnhancedChangesList.php b/includes/changes/EnhancedChangesList.php index 099a295c91..4a0f5664d6 100644 --- a/includes/changes/EnhancedChangesList.php +++ b/includes/changes/EnhancedChangesList.php @@ -369,6 +369,7 @@ class EnhancedChangesList extends ChangesList { ) { $lineParams['classes'] = [ 'mw-enhanced-watched' ]; } + $separator = ' . . '; $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 []; -- 2.20.1