Don't show deleted user names
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 9 Mar 2009 08:52:04 +0000 (08:52 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 9 Mar 2009 08:52:04 +0000 (08:52 +0000)
includes/parser/Parser.php

index 33bfbd8..eeb06d4 100644 (file)
@@ -4638,9 +4638,8 @@ class Parser
                // if this template is subst: the revision id will be blank,
                // so just use the current user's name
                if( $this->mRevisionId ) {
-                       $dbr = wfGetDB( DB_SLAVE );
-                       $revuser = $dbr->selectField( 'revision', 'rev_user_text',
-                               array( 'rev_id' => $this->mRevisionId ), __METHOD__ );
+                       $revision = Revision::newFromId( $this->mRevisionId );
+                       $revuser = $revision->getUserText();
                } else {
                        global $wgUser;
                        $revuser = $wgUser->getName();