Hoo man has submitted this change and it was merged.
Change subject: Adding username to the account details section of
Special:CentralAuth
......................................................................
Adding username to the account details section of Special:CentralAuth
Bug: 36015
Change-Id: Ia7e0121848b42d48c5c16a190ddc741a7d0954bc
---
M CentralAuth.i18n.php
M specials/SpecialCentralAuth.php
2 files changed, 13 insertions(+), 5 deletions(-)
Approvals:
Hoo man: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/CentralAuth.i18n.php b/CentralAuth.i18n.php
index 4a63182..7ca6ddd 100644
--- a/CentralAuth.i18n.php
+++ b/CentralAuth.i18n.php
@@ -141,6 +141,7 @@
'centralauth-admin-permission' => "Only stewards may merge
other people's accounts for them.",
'centralauth-admin-no-unified' => 'No unified account for this
username.',
'centralauth-admin-info-header' => 'Global user info',
+ 'centralauth-admin-info-username' => 'User name:',
'centralauth-admin-info-id' => 'User ID:',
'centralauth-admin-info-registered' => 'Registered:',
'centralauth-admin-info-home' => 'Home wiki:',
@@ -533,6 +534,7 @@
'centralauth-admin-info-registered' => "Label of information shown in
box of 'Global user info' on
[{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} Global user manager]
special page.
The following message appears after the colon: date_time (time_span)",
+ 'centralauth-admin-info-username' => "Label of information shown in box
of 'Global user info' on
[{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} Global user manager]
special page.",
'centralauth-admin-info-home' => "Label of information shown in box of
'Global user info' on
[{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} Global user manager]
special page.",
'centralauth-admin-info-editcount' => "Label of information shown in
box of 'Global user info' on
[{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} Global user manager]
special page.",
'centralauth-admin-info-locked' => "Label of information shown in box
of 'Global user info' on
[{{canonicalurl:meta:Special:CentralAuth|target=Siebrand}} Global user manager]
special page. The following messages can appear after the colon:
diff --git a/specials/SpecialCentralAuth.php b/specials/SpecialCentralAuth.php
index 279de73..20759ed 100644
--- a/specials/SpecialCentralAuth.php
+++ b/specials/SpecialCentralAuth.php
@@ -289,6 +289,7 @@
$reg = $globalUser->getRegistration();
$age = $this->prettyTimespan( wfTimestamp( TS_UNIX ) -
wfTimestamp( TS_UNIX, $reg ) );
$attribs = array(
+ 'username' => $globalUser->getName(),
'id' => $globalUser->getId(),
'registered' => htmlspecialchars(
$this->getLanguage()->timeanddate( $reg, true ) . " ($age)" ),
'home' => $this->determineHomeWiki(),
@@ -296,13 +297,18 @@
'locked' => $this->msg( $globalUser->isLocked() ?
'centralauth-admin-yes' : 'centralauth-admin-no' )->escaped(),
'hidden' => $this->formatHiddenLevel(
$globalUser->getHiddenLevel() )
);
- $out = '<fieldset id="mw-centralauth-info">';
- $out .= '<legend>' . $this->msg(
'centralauth-admin-info-header' )->escaped() . '</legend><ul>';
+
+ $content = Xml::openElement( "ul" );
foreach ( $attribs as $tag => $data ) {
- $out .= '<li><strong>' . $this->msg(
"centralauth-admin-info-$tag" )->escaped() . '</strong> ' .
- $data . '</li>';
+ $content .= Xml::openElement( "li" ) .
Xml::openElement( "strong" );
+ $content .= $this->msg( "centralauth-admin-info-$tag"
)->escaped();
+ $content .= Xml::closeElement( "strong" ) . ' ' . $data
. Xml::closeElement( "li" );
}
- $out .= '</ul></fieldset>';
+ $out = Xml::fieldset(
+ $this->msg( 'centralauth-admin-info-header'
)->escaped(),
+ $content,
+ array( "id" => "mw-centralauth-info" )
+ );
$this->getOutput()->addHTML( $out );
}
--
To view, visit https://gerrit.wikimedia.org/r/52151
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7e0121848b42d48c5c16a190ddc741a7d0954bc
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Pgehres <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Pgehres <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits