X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FWebInstallerPage.php;h=4bc6cad2465a3828efbb24c7ca12b5298d923a97;hb=c2665e4b6e615c80e4126f1ff343e7f9f3018dcc;hp=d4b3d657130a08b6047b90c31093e21f4ac69d52;hpb=31014d0e0b06595042a3c5517bd396a1b6a09fd2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index d4b3d65713..4bc6cad246 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -380,7 +380,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage { /** * Initiate an upgrade of the existing database - * @param array $vars Variables from LocalSettings.php and AdminSettings.php + * @param array $vars Variables from LocalSettings.php * @return Status */ protected function handleExistingUpgrade( $vars ) { @@ -482,7 +482,7 @@ class WebInstaller_DBConnect extends WebInstallerPage { $defaultType = $this->getVar( 'wgDBtype' ); // Messages: config-dbsupport-mysql, config-dbsupport-postgres, config-dbsupport-oracle, - // config-dbsupport-sqlite + // config-dbsupport-sqlite, config-dbsupport-mssql $dbSupport = ''; foreach ( Installer::getDBTypes() as $type ) { $dbSupport .= wfMessage( "config-dbsupport-$type" )->plain() . "\n"; @@ -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" ); }