mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-27 17:20:40 +00:00
Avoid unnecessary User instantiation
Change-Id: I224c8d4bff3cc90260b9f44e321cf4738f80a1b5
This commit is contained in:
parent
4d44d4f900
commit
8a8e3badfd
|
@ -510,9 +510,6 @@ abstract class EchoDiscussionParser {
|
|||
}
|
||||
|
||||
$userIdentity = $revision->getUser();
|
||||
$userID = $userIdentity ? $userIdentity->getId() : 0;
|
||||
$userName = $userIdentity ? $userIdentity->getName() : '';
|
||||
$user = $userID !== 0 ? User::newFromId( $userID ) : User::newFromName( $userName, false );
|
||||
|
||||
$prevText = '';
|
||||
if ( $revision->getParentId() ) {
|
||||
|
@ -531,7 +528,7 @@ abstract class EchoDiscussionParser {
|
|||
);
|
||||
$output = self::interpretDiff(
|
||||
$changes,
|
||||
$user->getName(),
|
||||
$userIdentity ? $userIdentity->getName() : '',
|
||||
Title::newFromLinkTarget( $revision->getPageAsLinkTarget() )
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue