Merge "Update documentation for $wgAutopromote"
[lhc/web/wiklou.git] / includes / changes / RCCacheEntryFactory.php
index 8ce21f5..d448eae 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  */
 use MediaWiki\Linker\LinkRenderer;
+use MediaWiki\Storage\RevisionRecord;
 
 class RCCacheEntryFactory {
 
@@ -79,10 +80,18 @@ class RCCacheEntryFactory {
                // Make user links
                $cacheEntry->userlink = $this->getUserLink( $cacheEntry );
 
-               if ( !ChangesList::isDeleted( $cacheEntry, Revision::DELETED_USER ) ) {
+               if ( !ChangesList::isDeleted( $cacheEntry, RevisionRecord::DELETED_USER ) ) {
                        $cacheEntry->usertalklink = Linker::userToolLinks(
                                $cacheEntry->mAttribs['rc_user'],
-                               $cacheEntry->mAttribs['rc_user_text']
+                               $cacheEntry->mAttribs['rc_user_text'],
+                               // Should the contributions link be red if the user has no edits (using default)
+                               false,
+                               // Customisation flags (using default 0)
+                               0,
+                               // User edit count (using default )
+                               null,
+                               // do not wrap the message in parentheses
+                               false
                        );
                }
 
@@ -96,7 +105,7 @@ class RCCacheEntryFactory {
         * @return bool
         */
        private function showDiffLinks( RecentChange $cacheEntry, User $user ) {
-               return ChangesList::userCan( $cacheEntry, Revision::DELETED_TEXT, $user );
+               return ChangesList::userCan( $cacheEntry, RevisionRecord::DELETED_TEXT, $user );
        }
 
        /**
@@ -273,13 +282,14 @@ class RCCacheEntryFactory {
         * @return string
         */
        private function getUserLink( RecentChange $cacheEntry ) {
-               if ( ChangesList::isDeleted( $cacheEntry, Revision::DELETED_USER ) ) {
+               if ( ChangesList::isDeleted( $cacheEntry, RevisionRecord::DELETED_USER ) ) {
                        $userLink = ' <span class="history-deleted">' .
                                $this->context->msg( 'rev-deleted-user' )->escaped() . '</span>';
                } else {
                        $userLink = Linker::userLink(
                                $cacheEntry->mAttribs['rc_user'],
-                               $cacheEntry->mAttribs['rc_user_text']
+                               $cacheEntry->mAttribs['rc_user_text'],
+                               ExternalUserNames::getLocal( $cacheEntry->mAttribs['rc_user_text'] )
                        );
                }