Fixed up that buggered commit so Brion won't stab me.
authorRob Church <robchurch@users.mediawiki.org>
Wed, 22 Feb 2006 21:50:09 +0000 (21:50 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Wed, 22 Feb 2006 21:50:09 +0000 (21:50 +0000)
includes/SpecialUserlogin.php

index 4070972..c6946ab 100644 (file)
@@ -485,9 +485,8 @@ class LoginForm {
                $link .= '</a>';
 
                # 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