mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-09-24 02:39:20 +00:00
Remove $isDropdownItem param from SkinVector::getCreateAccountHTML
The SkinVector::getCreateAccountHTML method only had one caller which always passed `true` for the $isDropdown argument. Therefore, we can remove this param and always assume that it is a dropdown item. Bug: T317789 Change-Id: I19ceecbac152d1399ab323ab14e07db9dc82c244
This commit is contained in:
parent
21573d8288
commit
849e63b798
|
@ -222,19 +222,17 @@ abstract class SkinVector extends SkinMustache {
|
|||
/**
|
||||
* Returns HTML for the create account link inside the anon user links
|
||||
* @param string[] $returnto array of query strings used to build the login link
|
||||
* @param bool $isDropdownItem Set true for create account link inside the user menu dropdown
|
||||
* which includes icon classes and is not styled like a button
|
||||
* @return string
|
||||
*/
|
||||
private function getCreateAccountHTML( $returnto, $isDropdownItem ) {
|
||||
private function getCreateAccountHTML( $returnto ) {
|
||||
$createAccountData = $this->buildCreateAccountData( $returnto );
|
||||
$createAccountData = array_merge( $createAccountData, [
|
||||
'class' => $isDropdownItem ? [
|
||||
'class' => [
|
||||
'vector-menu-content-item',
|
||||
] : '',
|
||||
],
|
||||
'collapsible' => true,
|
||||
'icon' => $isDropdownItem ? $createAccountData['icon'] : null,
|
||||
'button' => !$isDropdownItem,
|
||||
'icon' => $createAccountData['icon'],
|
||||
'button' => false
|
||||
] );
|
||||
$createAccountData = Hooks::updateLinkData( $createAccountData );
|
||||
return $this->makeLink( 'create-account', $createAccountData );
|
||||
|
@ -254,7 +252,7 @@ abstract class SkinVector extends SkinMustache {
|
|||
] );
|
||||
$loginLinkData = Hooks::updateLinkData( $loginLinkData );
|
||||
$templateData = [
|
||||
'htmlCreateAccount' => $this->getCreateAccountHTML( $returnto, true ),
|
||||
'htmlCreateAccount' => $this->getCreateAccountHTML( $returnto ),
|
||||
'htmlLogin' => $this->makeLink( 'login', $loginLinkData ),
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue