mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-09-23 18:28:58 +00:00
feat(core): use member names instead of group names in user menu (#656)
* Update Header.php * Clean up and ucfirst group member name --------- Co-authored-by: alistair3149 <alistair3149@users.noreply.github.com>
This commit is contained in:
parent
eed8972d2b
commit
9a0ffcc186
|
@ -111,16 +111,20 @@ final class Header extends Partial {
|
|||
}
|
||||
|
||||
$html = '';
|
||||
$msgName = 'group-%s';
|
||||
$msgName = 'group-%s-member';
|
||||
|
||||
// There must be a cleaner way
|
||||
foreach ( $groups as $group ) {
|
||||
$id = sprintf( $msgName, $group );
|
||||
$msg = $this->skin->msg( $id )->text();
|
||||
$title = $this->title->newFromText(
|
||||
$this->skin->msg( sprintf( $msgName, $group ) )->text(),
|
||||
$msg,
|
||||
NS_PROJECT
|
||||
);
|
||||
if ( $msg ) {
|
||||
// Member names are in lowercase
|
||||
$msg = ucfirst( $msg );
|
||||
}
|
||||
if ( $title ) {
|
||||
$href = $title->getLinkURL();
|
||||
$html .= <<< HTML
|
||||
|
|
Loading…
Reference in a new issue