r48971 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48970‎ | r48971 | r48972 >
Date:19:15, 28 March 2009
Author:catrope
Status:ok
Tags:
Comment:
Followup to r48970: apply userrights changes to CentralAuth
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuth.php (modified) (history)
  • /trunk/extensions/CentralAuth/CentralAuthHooks.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialGlobalGroupMembership.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/SpecialGlobalGroupMembership.php
@@ -93,17 +93,17 @@
9494 LogEventsList::showLogExtract( $output, 'gblrights', $pageTitle->getPrefixedText() );
9595 }
9696
97 - function addLogEntry( $user, $oldGroups, $newGroups ) {
 97+ static function addLogEntry( $user, $oldGroups, $newGroups, $reason ) {
9898 global $wgRequest;
9999
100100 $log = new LogPage( 'gblrights' );
101101
102102 $log->addEntry( 'usergroups',
103103 $user->getUserPage(),
104 - $wgRequest->getText( 'user-reason' ),
 104+ $reason,
105105 array(
106 - $this->makeGroupNameList( $oldGroups ),
107 - $this->makeGroupNameList( $newGroups )
 106+ self::makeGroupNameList( $oldGroups ),
 107+ self::makeGroupNameList( $newGroups )
108108 )
109109 );
110110 }
Index: trunk/extensions/CentralAuth/CentralAuth.php
@@ -166,6 +166,7 @@
167167 $wgHooks['UserLoadDefaults'][] = 'CentralAuthHooks::onUserLoadDefaults';
168168 $wgHooks['getUserPermissionsErrorsExpensive'][] = 'CentralAuthHooks::onGetUserPermissionsErrorsExpensive';
169169 $wgHooks['MakeGlobalVariablesScript'][] = 'CentralAuthHooks::onMakeGlobalVariablesScript';
 170+$wgHooks['UserRightsLogEntry'][] = 'CentralAuthHooks::onUserRightsLogEntry';
170171
171172 // For interaction with the Special:Renameuser extension
172173 $wgHooks['RenameUserWarning'][] = 'CentralAuthHooks::onRenameUserWarning';
Index: trunk/extensions/CentralAuth/CentralAuthHooks.php
@@ -532,4 +532,10 @@
533533 }
534534 return true;
535535 }
 536+
 537+ static function onUserRightsLogEntry( $user, $oldGroups, $newGroups, $reason ) {
 538+ SpecialGlobalGroupMembership::addLogEntry( $user, $oldGroups,
 539+ $newGroups, $reason );
 540+ return false;
 541+ }
536542 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r48988CentralAuth: Fix regression from r48971, breaking core userrights logging whe...catrope11:01, 29 March 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r48970Redo r48746 (API userrights, reverted in r48909 and r48910) in a way that doe...catrope19:08, 28 March 2009

Status & tagging log