From 60ea873937c829b00439bf91544ce2ce8d58df87 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 22 Feb 2006 21:50:09 +0000 Subject: [PATCH] Fixed up that buggered commit so Brion won't stab me. --- includes/SpecialUserlogin.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/includes/SpecialUserlogin.php b/includes/SpecialUserlogin.php index 40709725ac..c6946ab143 100644 --- a/includes/SpecialUserlogin.php +++ b/includes/SpecialUserlogin.php @@ -485,9 +485,8 @@ class LoginForm { $link .= ''; # Don't show a "create account" link if the user can't - #if( $this->mType == 'signup' || ( $this->mType == 'login' && $wgUser->isAllowedToCreateAccount() ) ) { + if( $this->showCreateOrLoginLink( $wgUser ) ) $template->set( 'link', wfMsgHtml( $linkmsg, $link ) ); - #} $template->set( 'header', '' ); $template->set( 'name', $this->mName ); @@ -519,6 +518,19 @@ class LoginForm { $wgOut->setArticleRelated( false ); $wgOut->addTemplate( $template ); } + + /** + * @access private + */ + function showCreateOrLoginLink( &$user ) { + if( $this->mType == 'signup' ) { + return( true ); + } elseif( $user->isAllowedToCreateAccount() ) { + return( true ); + } else { + return( false ); + } + } /** * @access private -- 2.20.1