VitaliyFilippov has submitted this change and it was merged.
Change subject: Display user_name when user_real_name is empty
......................................................................
Display user_name when user_real_name is empty
Change-Id: I0ac0f5e5afd29046cc081ca1687702c24dcf825d
---
M WhoIsWatching_body.php
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
VitaliyFilippov: Verified; Looks good to me, approved
diff --git a/WhoIsWatching_body.php b/WhoIsWatching_body.php
index 53a0b31..f5c99de 100644
--- a/WhoIsWatching_body.php
+++ b/WhoIsWatching_body.php
@@ -78,11 +78,11 @@
$u = User::newFromName( $row->user_name );
if ( !array_key_exists( $u->getID(),
$watchingusers ) &&
$u->isAllowed( 'read' ) &&
$u->getEmail() ) {
- $users[strtolower( $u->getRealName() )]
= $u->getID();
+ $users[ $u->getID() ] =
$u->getRealName() ? $u->getRealName() : $u->getName();
}
}
- ksort( $users );
- foreach ( $users as $name => $id ) {
+ asort( $users );
+ foreach ( $users as $id => $name ) {
$wgOut->addHTML( "<option
value=\"".$id."\">".$name."</option>" );
}
$wgOut->addHTML( '</select></td><td>' );
--
To view, visit https://gerrit.wikimedia.org/r/56388
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0ac0f5e5afd29046cc081ca1687702c24dcf825d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhoIsWatching
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov <[email protected]>
Gerrit-Reviewer: VitaliyFilippov <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits