Deprecated $wgUDPProfilerHost, $wgUDPProfilerPort and $wgUDPProfilerFormatString
[lhc/web/wiklou.git] / includes / User.php
index 3661b4f..5348020 100644 (file)
@@ -112,6 +112,7 @@ class User implements IDBAccessObject {
                'deletelogentry',
                'deleterevision',
                'edit',
+               'editcontentmodel',
                'editinterface',
                'editprotected',
                'editmyoptions',
@@ -641,10 +642,11 @@ class User implements IDBAccessObject {
                global $wgContLang, $wgMaxNameChars;
 
                if ( $name == ''
-               || User::isIP( $name )
-               || strpos( $name, '/' ) !== false
-               || strlen( $name ) > $wgMaxNameChars
-               || $name != $wgContLang->ucfirst( $name ) ) {
+                       || User::isIP( $name )
+                       || strpos( $name, '/' ) !== false
+                       || strlen( $name ) > $wgMaxNameChars
+                       || $name != $wgContLang->ucfirst( $name )
+               ) {
                        wfDebugLog( 'username', __METHOD__ .
                                ": '$name' invalid due to empty, IP, slash, length, or lowercase" );
                        return false;
@@ -3817,7 +3819,6 @@ class User implements IDBAccessObject {
                        return false;
                }
 
-               $passwordFactory = self::getPasswordFactory();
                if ( !$this->mPassword->equals( $password ) ) {
                        if ( $wgLegacyEncoding ) {
                                // Some wikis were converted from ISO 8859-1 to UTF-8, the passwords can't be converted
@@ -3831,6 +3832,7 @@ class User implements IDBAccessObject {
                        }
                }
 
+               $passwordFactory = self::getPasswordFactory();
                if ( $passwordFactory->needsUpdate( $this->mPassword ) ) {
                        $this->mPassword = $passwordFactory->newFromPlaintext( $password );
                        $this->saveSettings();
@@ -4417,8 +4419,8 @@ class User implements IDBAccessObject {
                global $wgImplicitGroups;
 
                $groups = $wgImplicitGroups;
-               # Deprecated, use $wgImplictGroups instead
-               wfRunHooks( 'UserGetImplicitGroups', array( &$groups ) );
+               # Deprecated, use $wgImplicitGroups instead
+               wfRunHooks( 'UserGetImplicitGroups', array( &$groups ), '1.25' );
 
                return $groups;
        }
@@ -4474,7 +4476,7 @@ class User implements IDBAccessObject {
                }
                $title = self::getGroupPage( $group );
                if ( $title ) {
-                       $page = $title->getPrefixedText();
+                       $page = $title->getFullText();
                        return "[[$page|$text]]";
                } else {
                        return $text;
@@ -4511,6 +4513,7 @@ class User implements IDBAccessObject {
 
                // Same thing for remove
                if ( empty( $wgRemoveGroups[$group] ) ) {
+                       // Do nothing
                } elseif ( $wgRemoveGroups[$group] === true ) {
                        $groups['remove'] = self::getAllGroups();
                } elseif ( is_array( $wgRemoveGroups[$group] ) ) {
@@ -4536,6 +4539,7 @@ class User implements IDBAccessObject {
 
                // Now figure out what groups the user can add to him/herself
                if ( empty( $wgGroupsAddToSelf[$group] ) ) {
+                       // Do nothing
                } elseif ( $wgGroupsAddToSelf[$group] === true ) {
                        // No idea WHY this would be used, but it's there
                        $groups['add-self'] = User::getAllGroups();
@@ -4544,6 +4548,7 @@ class User implements IDBAccessObject {
                }
 
                if ( empty( $wgGroupsRemoveFromSelf[$group] ) ) {
+                       // Do nothing
                } elseif ( $wgGroupsRemoveFromSelf[$group] === true ) {
                        $groups['remove-self'] = User::getAllGroups();
                } elseif ( is_array( $wgGroupsRemoveFromSelf[$group] ) ) {