Mainframe98 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355880 )

Change subject: Fix the incompatible function declarations
......................................................................

Fix the incompatible function declarations

This allows the extension to function on Special:SpecialPages without
displaying errors

Bug: T166436
Change-Id: I8e023b5d37fa2c3f791a1d92366a179c3407f767
---
M GlobalUserrights_body.php
1 file changed, 17 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserrights 
refs/changes/80/355880/1

diff --git a/GlobalUserrights_body.php b/GlobalUserrights_body.php
index c728b2a..dd11692 100644
--- a/GlobalUserrights_body.php
+++ b/GlobalUserrights_body.php
@@ -20,10 +20,16 @@
        /**
         * Save global user groups changes in the DB
         *
-        * @param $username String: username
-        * @param $reason String: reason
+        * @param User|UserRightsProxy $user
+        * @param array $add
+        * @param array $remove
+        * @param string $reason reason
+        * @param array $tags
+        * @param array $groupExpiries
+        * @return array
+        * @internal param string $username username
         */
-       function doSaveUserGroups( $user, $add, $remove, $reason = '' ) {
+       function doSaveUserGroups( $user, $add, $remove, $reason = '', $tags = 
[], $groupExpiries = [] ) {
                $oldGroups = GlobalUserrightsHooks::getGroups( $user );
                $newGroups = $oldGroups;
 
@@ -52,7 +58,7 @@
 
                // if anything changed, log it
                if ( $newGroups != $oldGroups ) {
-                       $this->addLogEntry( $user, $oldGroups, $newGroups, 
$reason );
+                       $this->addLogEntry( $user, $oldGroups, $newGroups, 
$reason, $tags, [], [] );
                }
                return array( $add, $remove );
        }
@@ -84,8 +90,12 @@
 
        /**
         * Add a gblrights log entry
+        * @param User|UserRightsProxy $user
+        * @param array $oldGroups
+        * @param array $newGroups
+        * @param string $reason
         */
-       function addLogEntry( $user, $oldGroups, $newGroups, $reason ) {
+       function addLogEntry( $user, $oldGroups, $newGroups, $reason, $tags, 
$oldUGMs, $newUGMs ) {
                $log = new LogPage( 'gblrights' );
 
                $log->addEntry( 'rights',
@@ -116,11 +126,11 @@
                }
        }
 
-       protected function showEditUserGroupsForm( $user, $groups ) {
+       protected function showEditUserGroupsForm( $user, $groups, 
$groupMemberships ) {
                // override the $groups that is passed, which will be
                // the user's local groups
                $groups = GlobalUserrightsHooks::getGroups( $user );
-               parent::showEditUserGroupsForm( $user, $groups );
+               parent::showEditUserGroupsForm( $user, $groups, 
$groupMemberships );
        }
 
        function changeableGroups() {

-- 
To view, visit https://gerrit.wikimedia.org/r/355880
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e023b5d37fa2c3f791a1d92366a179c3407f767
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalUserrights
Gerrit-Branch: master
Gerrit-Owner: Mainframe98 <k.s.w...@hotmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to