From: Rob Church Date: Wed, 22 Feb 2006 21:50:09 +0000 (+0000) Subject: Fixed up that buggered commit so Brion won't stab me. X-Git-Tag: 1.6.0~301 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=60ea873937c829b00439bf91544ce2ce8d58df87;p=lhc%2Fweb%2Fwiklou.git Fixed up that buggered commit so Brion won't stab me. --- 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