Index: trunk/extensions/CentralAuth/SpecialGlobalGroupMembership.php |
— | — | @@ -93,17 +93,17 @@ |
94 | 94 | LogEventsList::showLogExtract( $output, 'gblrights', $pageTitle->getPrefixedText() ); |
95 | 95 | } |
96 | 96 | |
97 | | - function addLogEntry( $user, $oldGroups, $newGroups ) { |
| 97 | + static function addLogEntry( $user, $oldGroups, $newGroups, $reason ) { |
98 | 98 | global $wgRequest; |
99 | 99 | |
100 | 100 | $log = new LogPage( 'gblrights' ); |
101 | 101 | |
102 | 102 | $log->addEntry( 'usergroups', |
103 | 103 | $user->getUserPage(), |
104 | | - $wgRequest->getText( 'user-reason' ), |
| 104 | + $reason, |
105 | 105 | array( |
106 | | - $this->makeGroupNameList( $oldGroups ), |
107 | | - $this->makeGroupNameList( $newGroups ) |
| 106 | + self::makeGroupNameList( $oldGroups ), |
| 107 | + self::makeGroupNameList( $newGroups ) |
108 | 108 | ) |
109 | 109 | ); |
110 | 110 | } |
Index: trunk/extensions/CentralAuth/CentralAuth.php |
— | — | @@ -166,6 +166,7 @@ |
167 | 167 | $wgHooks['UserLoadDefaults'][] = 'CentralAuthHooks::onUserLoadDefaults'; |
168 | 168 | $wgHooks['getUserPermissionsErrorsExpensive'][] = 'CentralAuthHooks::onGetUserPermissionsErrorsExpensive'; |
169 | 169 | $wgHooks['MakeGlobalVariablesScript'][] = 'CentralAuthHooks::onMakeGlobalVariablesScript'; |
| 170 | +$wgHooks['UserRightsLogEntry'][] = 'CentralAuthHooks::onUserRightsLogEntry'; |
170 | 171 | |
171 | 172 | // For interaction with the Special:Renameuser extension |
172 | 173 | $wgHooks['RenameUserWarning'][] = 'CentralAuthHooks::onRenameUserWarning'; |
Index: trunk/extensions/CentralAuth/CentralAuthHooks.php |
— | — | @@ -532,4 +532,10 @@ |
533 | 533 | } |
534 | 534 | return true; |
535 | 535 | } |
| 536 | + |
| 537 | + static function onUserRightsLogEntry( $user, $oldGroups, $newGroups, $reason ) { |
| 538 | + SpecialGlobalGroupMembership::addLogEntry( $user, $oldGroups, |
| 539 | + $newGroups, $reason ); |
| 540 | + return false; |
| 541 | + } |
536 | 542 | } |