From 849e63b798e2f16fec0278ce2b8ead6cd00fd782 Mon Sep 17 00:00:00 2001 From: Nicholas Ray Date: Fri, 30 Sep 2022 14:03:02 -0600 Subject: [PATCH] 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 --- includes/SkinVector.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/includes/SkinVector.php b/includes/SkinVector.php index 0aa3108a..94af719b 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -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 ), ];