X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=blobdiff_plain;f=includes%2Finstaller%2FWebInstallerPage.php;h=f83db544207611d7ad5dc19711f00ba8efd38e52;hb=c63e33d5cf04487247df5dd07b3bba7ee32c5f8d;hp=67236e566c3eeefcbba8abb1b65a3defc739aee5;hpb=5daebffd285e4d0dea26c88b730940744eb0cc51;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 67236e566c..f83db54420 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -827,7 +827,11 @@ class WebInstaller_Name extends WebInstallerPage { $msg = false; $pwd = $this->getVar( '_AdminPassword' ); $user = User::newFromName( $cname ); - $valid = $user && $user->getPasswordValidity( $pwd ); + if ( $user ) { + $valid = $user->getPasswordValidity( $pwd ); + } else { + $valid = 'config-admin-name-invalid'; + } if ( strval( $pwd ) === '' ) { # $user->getPasswordValidity just checks for $wgMinimalPasswordLength. # This message is more specific and helpful. @@ -835,8 +839,6 @@ class WebInstaller_Name extends WebInstallerPage { } elseif ( $pwd !== $this->getVar( '_AdminPassword2' ) ) { $msg = 'config-admin-password-mismatch'; } elseif ( $valid !== true ) { - # As of writing this will only catch the username being e.g. 'FOO' and - # the password 'foo' $msg = $valid; } if ( $msg !== false ) { @@ -1291,7 +1293,7 @@ class WebInstaller_Complete extends WebInstallerPage { ) { // JS appears to be the only method that works consistently with IE7+ $this->addHtml( "\n\n" ); + Xml::encodeJsVar( $lsUrl ) . "; } );\n" ); } else { $this->parent->request->response()->header( "Refresh: 0;url=$lsUrl" ); }