From: Antoine Musso Date: Sat, 5 Mar 2005 18:01:18 +0000 (+0000) Subject: * some comments X-Git-Tag: 1.5.0alpha1~672 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22brouteur%22%2C%28%24id_rubrique%20?a=commitdiff_plain;h=04aa85dbb2cd17075a862ef376077c73030fc4f1;p=lhc%2Fweb%2Fwiklou.git * some comments * keep the "remember" check box when a user enter a wrong password. --- diff --git a/includes/SpecialUserlogin.php b/includes/SpecialUserlogin.php index a801e646f6..28bb93cdd3 100644 --- a/includes/SpecialUserlogin.php +++ b/includes/SpecialUserlogin.php @@ -29,6 +29,10 @@ class LoginForm { var $mAction, $mCreateaccount, $mCreateaccountMail, $mMailmypassword; var $mLoginattempt, $mRemember, $mEmail; + /** + * Constructor + * @param webrequest $request A webrequest object passed by reference + */ function LoginForm( &$request ) { global $wgLang, $wgAllowRealName, $wgEnableEmail; global $wgEmailAuthentication; @@ -206,7 +210,7 @@ class LoginForm { if ( is_null( $u ) || ( '' == $name ) || $wgUser->isIP( $name ) || - (strpos( $name, "/" ) !== false) || + (strpos( $name, '/' ) !== false) || (strlen( $name ) > $wgMaxNameChars) || ($wgUseLatin1 && preg_match( "/[\x80-\xA0]/", $name )) || ucFirst($name) != $u->getName() ) @@ -448,6 +452,7 @@ class LoginForm { /** + * @param string $msg Message that will be shown on success. * @access private */ function successfulLogin( $msg ) { @@ -465,8 +470,9 @@ class LoginForm { $wgOut->returnToMain(); } + /** */ function userNotPrivilegedMessage() { - global $wgOut, $wgUser, $wgLang; + global $wgOut; $wgOut->setPageTitle( wfMsg( 'whitelistacctitle' ) ); $wgOut->setRobotpolicy( 'noindex,nofollow' ); @@ -515,7 +521,7 @@ class LoginForm { $template->set( 'userealname', $wgAllowRealName ); $template->set( 'useemail', $wgEnableEmail ); $template->set( 'useemailauthent', $wgEmailAuthentication ); - $template->set( 'remember', $wgUser->getOption( 'rememberpassword' ) ); + $template->set( 'remember', $wgUser->getOption( 'rememberpassword' ) or $this->mRemember ); $wgOut->setPageTitle( wfMsg( 'userlogin' ) ); $wgOut->setRobotpolicy( 'noindex,nofollow' );