From: amir Date: Mon, 28 Mar 2016 04:58:11 +0000 (+0430) Subject: Let EnhancedChangesListModifyLineData Hook change classes as well X-Git-Tag: 1.31.0-rc.0~6604^2 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=1a5451653066a02e7cd08f03844a8b035b09ea62;p=lhc%2Fweb%2Fwiklou.git Let EnhancedChangesListModifyLineData Hook change classes as well Change-Id: I7c2ae57bd3b18c26b12dd36e331deb6af5fa36c2 --- 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 [];