ChangesList: Add $groups parameter to FetchChangesList hook
authorjdlrobson <jdlrobson@gmail.com>
Fri, 19 Jul 2019 14:46:57 +0000 (07:46 -0700)
committerKrinkle <krinklemail@gmail.com>
Mon, 22 Jul 2019 21:31:40 +0000 (21:31 +0000)
This parameter is needed for consumers trying to return a $list object.

Bug: T228280
Change-Id: Ib68ff8fa782ac12479ef02247cdf78e405b64bad

docs/hooks.txt
includes/changes/ChangesList.php

index 36e0891..06f7eec 100644 (file)
@@ -1527,6 +1527,7 @@ $user: User the list is being fetched for
 &$skin: Skin object to be used with the list
 &$list: List object (defaults to NULL, change it to an object instance and
   return false override the list derivative used)
+$groups Array of ChangesListFilterGroup objects (added in 1.34)
 
 'FileDeleteComplete': When a file is deleted.
 &$file: reference to the deleted file
index ec9a061..4f05da5 100644 (file)
@@ -87,7 +87,7 @@ class ChangesList extends ContextSource {
                $user = $context->getUser();
                $sk = $context->getSkin();
                $list = null;
-               if ( Hooks::run( 'FetchChangesList', [ $user, &$sk, &$list ] ) ) {
+               if ( Hooks::run( 'FetchChangesList', [ $user, &$sk, &$list, $groups ] ) ) {
                        $new = $context->getRequest()->getBool( 'enhanced', $user->getOption( 'usenewrc' ) );
 
                        return $new ?