0
edits
Welcome to Mariopedia! If you want to request an account, please do so at Mario Wiki or Fanonpedia.
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
body { | body { | ||
font-family: 'Verdana', sans-serif; | font-family: 'Verdana', sans-serif; | ||
protected function useCombinedLoginLink() { | |||
$services = MediaWikiServices::getInstance(); | |||
$authManager = $services->getAuthManager(); | |||
$useCombinedLoginLink = $this->getConfig()->get( 'UseCombinedLoginLink' ); | |||
if ( !$authManager->canCreateAccounts() || !$authManager->canAuthenticateNow() ) { | |||
// don't show combined login/signup link if one of those is actually not available | |||
$useCombinedLoginLink = true; | |||
} | |||
return $useCombinedLoginLink; | |||
} | |||
protected function buildLoginData( $returnto, $useCombinedLoginLink ) { | |||
$title = $this->getTitle(); | |||
$loginlink = $this->getAuthority()->isAllowed( 'createaccount' ) | |||
&& $useCombinedLoginLink ? 'nav-login-createaccount' : 'pt-login'; | |||
$login_url = [ | |||
'text' => $this->msg( $loginlink )->text(), | |||
'href' => self::makeSpecialUrl( 'Userlogin', $returnto ), | |||
'active' => $title->isSpecial( 'Userlogin' ) | |||
|| $title->isSpecial( 'CreateAccount' ) && $useCombinedLoginLink, | |||
'icon' => 'logIn' | |||
]; | |||
return $login_url; | |||
} |
edits