added new hook, UserRights::showEditUserGroupsForm from Wikia codebase
authorJack Phoenix <ashley@users.mediawiki.org>
Sat, 25 Oct 2008 22:37:56 +0000 (22:37 +0000)
committerJack Phoenix <ashley@users.mediawiki.org>
Sat, 25 Oct 2008 22:37:56 +0000 (22:37 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/specials/SpecialUserrights.php

index 89dae66..9fbe9c5 100644 (file)
@@ -177,6 +177,8 @@ The following extensions are migrated into MediaWiki 1.14:
 * Make search matches bold only, not red as well
 * Hook SkinTemplateTabAction now passes $title by reference allowing it to be 
   changed by extensions.
+* Added 'UserRights::showEditUserGroupsForm' hook to allow extensions to alter
+  the groups that the user can be added to or removed from in Special:UserRights
 
 === Bug fixes in 1.14 ===
 
index 6e92807..b4ea587 100644 (file)
@@ -1393,6 +1393,11 @@ $addergroups : Array of groups that the user is in
                                        'remove-self' => array( removable groups from self )
                                )
 
+'UserRights::showEditUserGroupsForm': called right before the form to edit group memberships at Special:UserRights is shown
+&$user: User or UserRightsProxy you're editing
+&$addable: Array of groups you can add the user into
+&$removable: Array of groups that you can remove the user from
+
 'UserRetrieveNewTalks': called when retrieving "You have new messages!" message(s)
 $user: user retrieving new talks messages
 $talks: array of new talks page(s)
index 36a6e6f..f0ad542 100644 (file)
@@ -351,6 +351,8 @@ class UserrightsPage extends SpecialPage {
 
                list( $addable, $removable ) = $this->splitGroups( $groups );
 
+               wfRunHooks( 'UserRights::showEditUserGroupsForm', array( &$user, &$addable, &$removable ) );
+
                $list = array();
                foreach( $user->getGroups() as $group )
                        $list[] = self::buildGroupLink( $group );