Merge "Balancer: Introduce BalanceElement::isHtmlNamed()"
[lhc/web/wiklou.git] / includes / specials / SpecialUserrights.php
index 29261f3..d5affc7 100644 (file)
@@ -119,7 +119,7 @@ class UserrightsPage extends SpecialPage {
                }
 
                $fetchedStatus = $this->fetchUser( $this->mTarget );
-               if ( $fetchedStatus->isOk() ) {
+               if ( $fetchedStatus->isOK() ) {
                        $this->mFetchedUser = $fetchedStatus->value;
                        if ( $this->mFetchedUser instanceof User ) {
                                // Set the 'relevant user' in the skin, so it displays links like Contributions,
@@ -250,8 +250,6 @@ class UserrightsPage extends SpecialPage {
         * @return array Tuple of added, then removed groups
         */
        function doSaveUserGroups( $user, $add, $remove, $reason = '' ) {
-               global $wgAuth;
-
                // Validate input set...
                $isself = $user->getName() == $this->getUser()->getName();
                $groups = $user->getGroups();
@@ -293,7 +291,9 @@ class UserrightsPage extends SpecialPage {
 
                // update groups in external authentication database
                Hooks::run( 'UserGroupsChanged', [ $user, $add, $remove, $this->getUser(), $reason ] );
-               $wgAuth->updateExternalDBGroups( $user, $add, $remove );
+               MediaWiki\Auth\AuthManager::callLegacyAuthPlugin(
+                       'updateExternalDBGroups', [ $user, $add, $remove ]
+               );
 
                wfDebug( 'oldGroups: ' . print_r( $oldGroups, true ) . "\n" );
                wfDebug( 'newGroups: ' . print_r( $newGroups, true ) . "\n" );
@@ -417,28 +417,18 @@ class UserrightsPage extends SpecialPage {
                return Status::newGood( $user );
        }
 
-       function makeGroupNameList( $ids ) {
-               if ( empty( $ids ) ) {
-                       return $this->msg( 'rightsnone' )->inContentLanguage()->text();
-               } else {
-                       return implode( ', ', $ids );
-               }
-       }
-
        /**
-        * Make a list of group names to be stored as parameter for log entries
+        * @since 1.15
         *
-        * @deprecated since 1.21; use LogFormatter instead.
         * @param array $ids
+        *
         * @return string
         */
-       function makeGroupNameListForLog( $ids ) {
-               wfDeprecated( __METHOD__, '1.21' );
-
+       public function makeGroupNameList( $ids ) {
                if ( empty( $ids ) ) {
-                       return '';
+                       return $this->msg( 'rightsnone' )->inContentLanguage()->text();
                } else {
-                       return $this->makeGroupNameList( $ids );
+                       return implode( ', ', $ids );
                }
        }
 
@@ -627,7 +617,7 @@ class UserrightsPage extends SpecialPage {
         * @return string
         */
        private static function buildGroupLink( $group ) {
-               return User::makeGroupLinkHtml( $group, User::getGroupName( $group ) );
+               return User::makeGroupLinkHTML( $group, User::getGroupName( $group ) );
        }
 
        /**
@@ -637,7 +627,7 @@ class UserrightsPage extends SpecialPage {
         * @return string
         */
        private static function buildGroupMemberLink( $group ) {
-               return User::makeGroupLinkHtml( $group, User::getGroupMember( $group ) );
+               return User::makeGroupLinkHTML( $group, User::getGroupMember( $group ) );
        }
 
        /**