EnhancedChangesList: Add latest revision ID to top level user link
Bug: T326395 Bug: T326396 Change-Id: Ia3966f59c271e3c9826c170ffb580715f4ee5a35
This commit is contained in:
parent
895163441a
commit
5fc40443ce
1 changed files with 11 additions and 8 deletions
|
|
@ -172,6 +172,7 @@ class EnhancedChangesList extends ChangesList {
|
|||
}
|
||||
|
||||
# Collate list of users
|
||||
$usercounts = [];
|
||||
$userlinks = [];
|
||||
# Other properties
|
||||
$curId = 0;
|
||||
|
|
@ -201,9 +202,11 @@ class EnhancedChangesList extends ChangesList {
|
|||
if ( !static::isDeleted( $rcObj, LogPage::DELETED_ACTION ) ) {
|
||||
$namehidden = false;
|
||||
}
|
||||
$u = $rcObj->userlink;
|
||||
if ( !isset( $userlinks[$u] ) ) {
|
||||
$userlinks[$u] = 0;
|
||||
$username = $rcObj->getPerformerIdentity()->getName();
|
||||
$userlink = $rcObj->userlink;
|
||||
if ( !isset( $usercounts[$username] ) ) {
|
||||
$usercounts[$username] = 0;
|
||||
$userlinks[$username] = $userlink;
|
||||
}
|
||||
if ( $rcObj->mAttribs['rc_type'] != RC_LOG ) {
|
||||
$allLogs = false;
|
||||
|
|
@ -214,15 +217,15 @@ class EnhancedChangesList extends ChangesList {
|
|||
$curId = $rcObj->mAttribs['rc_cur_id'];
|
||||
}
|
||||
|
||||
$userlinks[$u]++;
|
||||
$usercounts[$username]++;
|
||||
}
|
||||
|
||||
# Sort the list and convert to text
|
||||
krsort( $userlinks );
|
||||
asort( $userlinks );
|
||||
krsort( $usercounts );
|
||||
asort( $usercounts );
|
||||
$users = [];
|
||||
foreach ( $userlinks as $userlink => $count ) {
|
||||
$text = $userlink;
|
||||
foreach ( $usercounts as $username => $count ) {
|
||||
$text = $userlinks[$username];
|
||||
$text .= $this->getLanguage()->getDirMark();
|
||||
if ( $count > 1 ) {
|
||||
$formattedCount = $this->msg( 'ntimes' )->numParams( $count )->escaped();
|
||||
|
|
|
|||
Loading…
Reference in a new issue